Print Array: strings!

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2009
Posts: 39
Reputation: Danny_501 is an unknown quantity at this point 
Solved Threads: 1
Danny_501's Avatar
Danny_501 Danny_501 is offline Offline
Light Poster

Print Array: strings!

 
0
  #1
Mar 24th, 2009
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.

  1. template < typename T >
  2. void printArray(T * const array, int size)
  3. {
  4. for (int i=0; i < size; ++i)
  5. cout << array[i] << ' ';
  6. cout << endl;
  7.  
  8. }//printarray

any help would be great thanks.
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 39
Reputation: Danny_501 is an unknown quantity at this point 
Solved Threads: 1
Danny_501's Avatar
Danny_501 Danny_501 is offline Offline
Light Poster

Re: Print Array: strings!

 
0
  #2
Mar 24th, 2009
Sorry this is c++ not c#.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC