cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Structure string is invisible
Structure string is invisible
Nov 24, 2014 at 12:12am UTC
skimmer001
(79)
Why is it that when i use a getline command to input a string for a structure it shows up as nothing? But, when I use a normal cin command, everything is all perfect and displays like it should?
Last edited on
Nov 24, 2014 at 1:56am UTC
Nov 24, 2014 at 2:09am UTC
Yanson
(885)
You probably have an extra newline in the input stream. Try adding a std::cin.ignore() statement before the getline.
Nov 24, 2014 at 2:14am UTC
skimmer001
(79)
Will do.
Nov 24, 2014 at 2:20am UTC
skimmer001
(79)
It worked. Thank you very much.
Topic archived. No new replies allowed.