#include <iostream>
using namespace std;
int main()
{
char array[5];
char* pointer;
pointer = array;
for( int i = 0; i < 5; i++ )
{
*pointer = 3;
pointer++;
}
for( int i = 0; i < 5; i++ )
{
cout << array[i];
}
return 0;
}
The problem is that when I debug this, it outputs strange characters that curiously resemble hearts...........
I have no clue what's wrong with this code...Please help
Edit: By the way, I am using Visual Studio Express 2008
This post has been edited by zmikeb: 09 March 2008 - 12:50 PM

New Topic/Question
Reply




MultiQuote





|