hi every one, I am making KBC game in C++. To store questions and its options in a file, I am unable to write successfully the character string of question in the file due to spaces between question. So,can anyone tell me how to write a character string having spaces to a file and how it can be read from the file in a character array?
Regards....
Sw8Lala 0 Newbie Poster
Recommended Answers
Jump to PostI think you need getline()
Jump to PostHave a do while...
I mean why restrict it to CTRL Z?
You could have a 'do you wish to continue (y/n)'
If answer = n then terminate the loop.
All 6 Replies

iamthwee
daviddoria 334 Posting Virtuoso Featured Poster
Sw8Lala 0 Newbie Poster

iamthwee
jacks2028 0 Newbie Poster
Sw8Lala 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.