cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Comparing Strings
Comparing Strings
Oct 10, 2009 at 2:14am UTC
helios
(17607)
You're appending the character before you know whether or not it's a carriage return, so your string ends up being "start bat\n" or something to that effect.
By the way, string.clear() is slightly better than string="".
Last edited on
Oct 10, 2009 at 2:15am UTC
Oct 10, 2009 at 2:50am UTC
firedraco
(6247)
O_o, another buggy topic...
Topic archived. No new replies allowed.