cin
C++ GetLine() Problem, Command Line Program
I am writing this program for my开发者_开发知识库 programming class and it has a bunch of stupid constraints like I must use nested if else statements and I have to use the cin.getLine() to get a play[详细]
2023-04-07 22:51 分类:问答Multiple inputs on one line
I have looked to no avail, and I\'m 开发者_C百科afraid that it might be such a simple question that nobody dares ask it.[详细]
2023-04-05 03:56 分类:问答How to get 2 ints from cin in C++?
I\'am trying to get three pairs of int from user. But if i enter letters my code ran into infinitive cycle. What am I doing wrong?[详细]
2023-04-03 17:50 分类:问答istream_iterator ignoring EOF (Ctrl+D) when reading chars
I\'m trying to use istream_iterator for reading characters from cin. I\'ve read that pressing Ctrl+D sends an EOF character which ends the input stream. Unfortunately, something is going wrong with it[详细]
2023-04-03 02:16 分类:问答Hide user input on password prompt [duplicate]
This question already has answers here: Closed 11 years ago. Possible Duplicate: Read a password from std::cin[详细]
2023-03-24 02:15 分类:问答What is Scala for: getline(), std::cin.eof(), std::cin.bad()?
Here is a fragment of C++ code: int AskBase::ask_user(){ for (int tries_left = MAX_TRIES; tries_left;){[详细]
2023-03-21 09:35 分类:问答c++ getline cin issue
while (true) { int read = recvData(clientSocket, buf, sizeof(buf)); if(read == SOCKET_ERROR) { cout<<\"Connection with the server is lost. Do you want to exit?\" << endl;[详细]
2023-03-18 19:00 分类:问答Using cin in C++
I\'d like to use cin and I used char for the int type (do you c开发者_运维技巧all it like that?)and it just shows one letter of what typed.How can I get the whole sentence?Since you\'re using c++ why[详细]
2023-03-15 14:20 分类:问答Assistance with Basic C++ Based GPA calculator and cin usage
I am trying to create a simple GPA calculator which prompts the user to enter the number of courses (using new) . This is followed by a for loop dependent on the number of courses, asking the user to[详细]
2023-03-15 06:20 分类:问答How to stop recursion if nothing is inputed in cin?
I am writing a program that must print numbers at first which was entered at last. So here is my code:[详细]
2023-03-12 18:11 分类:问答