A
Alex
here is the code i am having trouble with.
// first, I have a global variable
char *sName[ 1 ];
....
.....
// and then this function
void set_characterNameAgeSex()
{
char setName[ 50 ];
char *sTransfer;
short setSex;
short setAge;
// set name
cout << "Enter a name for your character(50 char. max): ";
cin.getline( setName, 49 );
sTransfer = setName;
sName[ 0 ] = sTransfer;
......
.........
-------------------
So what's happening is that the line: cin.getline( setName, 49 ); is being
skipped....but the cout line before that is being printed.
I'm using VC++6.0, and I have applied the fixes, but nothings changed.
I don't know if something is wrong with the compiler.......
Please help.
Thanks in advance.
// first, I have a global variable
char *sName[ 1 ];
....
.....
// and then this function
void set_characterNameAgeSex()
{
char setName[ 50 ];
char *sTransfer;
short setSex;
short setAge;
// set name
cout << "Enter a name for your character(50 char. max): ";
cin.getline( setName, 49 );
sTransfer = setName;
sName[ 0 ] = sTransfer;
......
.........
-------------------
So what's happening is that the line: cin.getline( setName, 49 ); is being
skipped....but the cout line before that is being printed.
I'm using VC++6.0, and I have applied the fixes, but nothings changed.
I don't know if something is wrong with the compiler.......
Please help.
Thanks in advance.