About 53 results
Open links in new tab
  1. c++ - How does cin work? - Stack Overflow

    Apr 28, 2016 · cin is a blocked input. Whatever comes from the keyboard is stored in a buffer. When you press enter the system passes the buffer to the application code (std::cin code). Operator >> will …

  2. How to cin Space in c++? - Stack Overflow

    Using cin's >> operator will drop leading whitespace and stop input at the first trailing whitespace. To grab an entire line of input, including spaces, try cin.getline().

  3. How do I use cin for an array - Stack Overflow

    Sep 20, 2018 · How do I use cin for an array Asked 7 years, 5 months ago Modified 2 years ago Viewed 79k times

  4. What are the rules of the std::cin object in C++? - Stack Overflow

    Apr 30, 2009 · I am currently reading in with std::cin >> for the strings I expect to be single words and getline(std::cin, string) for the strings with spaces. I am not getting the right output, though.

  5. if (cin >> x) - Why can you use that condition? - Stack Overflow

    Jul 22, 2011 · 79 cin is an object of class istream that represents the standard input stream. It corresponds to the cstdio stream stdin. The operator >> overload for streams return a reference to …

  6. What is the C equivalent to the C++ cin statement?

    Sep 16, 2010 · 3 There is no close equivalent to cin in C. C++ is an object oriented language and cin uses many of its features (object-orientation, templates, operator overloading) which are not …

  7. c++ - Очистка буфера ввода cin - Stack Overflow на русском

    Вопрос: Я хочу, чтобы при введение последовательности символов, считывался первый, а буфер ввода очищался от оставшихся. Посоветуйте, пожалуйста, функцию очистки буфера (cin.clear …

  8. Что такое cin >> в C++? - Stack Overflow на русском

    Feb 21, 2018 · Пример: cin >> name; // программа остановится - ожидается имя из клавиатуры cin >> age; // программа остановится - ожидается возраст из клавиатуры Когда на клавиатуре …

  9. c++ - std::cin input with spaces? - Stack Overflow

    Apr 30, 2011 · Best answer so far. When using std::getline(std::cin, s) I would get a very messy and I would say, interrupted input when waiting for inputs in a while / for loop. This option resolved my issue!

  10. ¿Porque es necesario usar el comando cin.ignore() después de usar "cin ...

    Sep 4, 2018 · En estos casos cin es capaz de ignorar una serie de caracteres identificados como separadores. En este caso, cin descarta los separadores que se encuentren antes de la secuencia …