You are viewing a single comment's thread. Return to all comments →
You can also do this . Here ch absorbs the end of file character and you are ready to go .
/* Start*/
cin >> doubleNumber; char ch = getchar(); //stores an end of line character getline(cin, stringName);
/end/
Seems like cookies are disabled on this browser, please enable them to open this website
Day 1: Data Types
You are viewing a single comment's thread. Return to all comments →
You can also do this . Here ch absorbs the end of file character and you are ready to go .
/* Start*/
cin >> doubleNumber; char ch = getchar(); //stores an end of line character getline(cin, stringName);
/end/