Top "Cin" questions

std::cin is the global stream object provided by the C++ standard library for reading from the standard input stream.

Reading piped input with C++

I am using the following code: #include <iostream> using namespace std; int main(int argc, char **argv) { string …

c++ pipe stdin cin
C++ Checking for an integer.

New to C++. Having issues correctly looping while handling errors. I am trying to check if user input is an …

c++ cin
Getting arrow keys from cin

I am sure this must have been asked before, but a quick search found nothing. How can I get the …

c++ cin
Passing input as a function argument using cin

My program: class test { int k; public: void changeval(int i){k=i;} }; int main() { test obj; int i; cin&…

c++ constructor arguments cin
Is it possible to use cin with Qt?

Is it possible to use cin in Qt? I can use cout but cannot find examples of how to use …

c++ qt iostream cin
cin and boolean input

I am new to C++ and I was wondering how the function cin in case of a boolean data works. …

c++ boolean cin
Find the end of stream for cin & ifstream?

I'm running myself through a C++ text book that I have as a refresher to C++ programming. One of the …

c++ ifstream eof cin istream
Read binary data from std::cin

What is the easiest way to read binary (non-formated) data from std::cin into either a string or a stringstream?

c++ stream binary stdin cin
How to read cin with whitespace up until a newline character?

I wish to read from cin in C++ from the current position up until a newline character into a string. …

c++ string cin
Can't get char from cin.get()

I'm working through some beginner exercises on c++, and this has me stumped. I can enter a number, but I …

c++ cin