Y
Yannick De Koninck
Hello,
I have the following construction:
#define STRINGLENGTH 30
...
char* Name;
....
Name = new char[STRINGLENGTH];
cin>>Name;
cout<<Name;
But the problem is, when I enter a string that contains spaces (eg: "it's
raining"), only the first part of this string is printed (so for the example
"it's" would be printed). Is there a way to avoid this and to read and pront
the entire string?
Thank you very much,
Yannick
I have the following construction:
#define STRINGLENGTH 30
...
char* Name;
....
Name = new char[STRINGLENGTH];
cin>>Name;
cout<<Name;
But the problem is, when I enter a string that contains spaces (eg: "it's
raining"), only the first part of this string is printed (so for the example
"it's" would be printed). Is there a way to avoid this and to read and pront
the entire string?
Thank you very much,
Yannick