Question:

Why is my C++ code reading input only to a space?

by  |  earlier

0 LIKES UnLike

Input Given gets translated to a string (purposely); and the file name stops at the space and then ends. Example, input (C:\Program Files\) goes to C:\Program.

I'd use Microsoft's Alternatives, such as System::String, but, VC++ isn't a good alternative.

Source link: http://cpp.pastebin.us/?show=f67839448

 Tags:

   Report

1 ANSWERS


  1. whitespace is a delimiter for the >> operator

    can you use cin.get instead?

    you'd have cin.get(cfile,599);

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.