954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Print Array: strings!

Can someone tell me why my print array method won't print strings.
It works with an int array, but only prints a few strings.

template < typename T >
void printArray(T * const array, int size)
{
    for (int i=0; i < size; ++i)
        cout << array[i] << ' ';
    cout << endl;

}//printarray


any help would be great thanks.

Danny_501
Junior Poster
109 posts since Mar 2009
Reputation Points: 36
Solved Threads: 4
 

Sorry this is c++ not c#.

Danny_501
Junior Poster
109 posts since Mar 2009
Reputation Points: 36
Solved Threads: 4
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You