View Single Post
Old Dec 2nd, 2005, 8:45 PM   #43
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,010
Rep Power: 5 lectricpharaoh will become famous soon enough
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.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote