Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Something absurdly wrong with char array
#2
The problem is, your trying to print characters as strings

Code:
cout<<A<<endl;
cout<<B<<endl;
cout<<C<<endl;

Your solution works by changing the characters to C strings...you could have also used

Code:
for (i = 0; i < 4; ++i)
{
std::cout<<A[i];
}
Slackware 13/ArchLinux - C/Assem/Python
Reply


Messages In This Thread
RE: Something absurdly wrong with char array - by g4143 - 11-29-2009, 06:23 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  2D Array Editor. InfamousKnight 0 609 03-11-2011, 07:11 PM
Last Post: InfamousKnight
  Array Help[C++] se7en 2 787 12-11-2009, 12:06 AM
Last Post: Sagittarius

Forum Jump:


Users browsing this thread: 1 Guest(s)