Quote:
|
Originally Posted by Planet_EN
Well, There's no header in Turbo C++ 3.1 which can "enable" or "provide" you string function (or class ...or whatever you want to say it...)
Although there are some way you have in Turbo C++ to input a full string.
The simplest you'd find is:
char *str;
str = new char; // for avoiding comipler runtime errors
cin >> str;
|
What
DaWei and
nnxion said. You've got a big oops here, and the irony is that you commented the offending line's purpose as avoiding errors, even if you were a little unsure whether it was a compiler error or a runtime error.
Try
str = new char[BUFFERSIZE];
instead.
Quote:
|
Originally Posted by Planet_EN
But it'll ignore everything after the whitespace(after you hit spacebar while entering a string).
To overcome this problem, try any of the below listed suggestions:
|
<snip>
I'm not sure how many of those will work, as we've already established he's got a pre-standard compiler. Those methods may differ in parameters, semantic function, or may even be absent entirely.