• Advertisement
Sign in to follow this  

The woes of cin...

This topic is 4248 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Cin, what a useless piece of crap. Now that that's out of my system, cin isn't too bad. Just, because it's a stream, it screws up. Anyways, onto my problem. I'm using cin to enter data into strings. However, cin will stop inputing at a space character. How can I solve this? Well, I used getline(), which worked for a bit. But, then when I use it more than once, it starts chopping off characters in the front of a string... So, how do I solve it? I'd like strings to be strings. Not cutting, not ommiting. But, cin won't do that to my knowledge. Help would be appreciated.

Share this post


Link to post
Share on other sites
Advertisement
Yikes. Hm. Well, back when Microsoft released that software (you know, EIGHT YEARS AGO) there was a bug in the STL implementation that caused problems with getline. I only dimly remember it, since now you can download, FOR FREE, a new version of VC++ which is faster and has more features and is more standards compliant and less buggy and easier to use and doesn't, you know, suck balls.

If you insist on continuing to use a compiler that was developed before C++ was standardized, back when Britney Spears was "a bold new talent", you should look here.

Share this post


Link to post
Share on other sites
Yea, I don't have SP2, and last time I installed it, my HDD crashed and I lost a lot of documents. I don't need to do that again. Ty for the link. (Is there a way to switch out compiler in VC6?)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Sneftel
Yikes. Hm. Well, back when Microsoft released that software (you know, EIGHT YEARS AGO) there was a bug in the STL implementation that caused problems with getline. I only dimly remember it, since now you can download, FOR FREE, a new version of VC++ which is faster and has more features and is more standards compliant and less buggy and easier to use and doesn't, you know, suck balls.

If you insist on continuing to use a compiler that was developed before C++ was standardized, back when Britney Spears was "a bold new talent", you should look here.


More like 9-10 years ago. VC6 was released in 1997, so coming up to 10 next year.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by dbzprogrammer
Yea, I don't have SP2, and last time I installed it, my HDD crashed and I lost a lot of documents. I don't need to do that again. Ty for the link. (Is there a way to switch out compiler in VC6?)


Yeah install SP2 but learn the art of this thing called BACKING UP then maybe you won't have that issue.

Share this post


Link to post
Share on other sites
Are you using cin.getline or std::getline?

I've used both methods in VC++ 98 for many years without problems, when utilized properly that is.

Sneftel does bring forth a good point re: Visual C++ .NET 2005 Express Edition is free.

Share this post


Link to post
Share on other sites
Quote:
Original post by Sneftel
If you insist on continuing to use a compiler that was developed before C++ was standardized, back when Britney Spears was "a bold new talent", you should look here.

Actually, VC6 had been out a year or two before Ms Spears became a bold new talent.

CM

Share this post


Link to post
Share on other sites
If SP2 is crashing your computer on install, try flash updating your BIOS before you install it. Worked for me on an old computer that I had.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement