If I was to declare a string variable and then use a cin user input to save in this variable, how could I make the input (the contents of the variable ...
If I was to declare a string variable and then use a cin user input to save in this variable, how could I make the input (the contents of the variable ...
I have a loop running that displays data read from a serial port on a console screen, the same screen lists some options for the user, such as the opt ...
Below is a little program in C++ which is supposed to act as the cat linux binutil: it gets one or several inputs as detailed in the command line argu ...
How do I accept an unknown number of lines in c++? Each line has two strings in it separated by a space. I tried the solutions mentioned in This cplus ...
I've been tasked to add 2 user input values using object-oriented programming in C++. I've been trying to use cin inside the main and outside the ma ...
I'm having a problem with a program I'm making when I try to ask the user to enter a value and then saving it to use it later in a formula. This what ...
I have to let user fill an array with 0-500 values, and at any moment they can exit entering the array with two consecutive empty value inputs (hittin ...
I've newly started learning C++ and am stuck with this problem. I need to insert a (user inputted) number of elements in a single line with space sepa ...
Well i know how to do this in c, for example: But for to do this in c++? Can cin be use like scanf? ...
I am creating a test for a function which gets the user input with std::cin, and then returns it. The test just needs to check if the input from the u ...
it needs to be in MM / DD / YYYY with spaces between the /. ...
I have to determine if the input is a digit or a string. For this I get error: no matching function for call to 'isdigit(std::__cxx11::string&) ...
I'm working on a school project that requires the verification of a string for the input, and NOTHING ELSE. However, whenever I pass an int for bug te ...
I am trying to input a 2d vector of string "t" times and make a grid of 2 * 2 size "t" times using C++ and the inputs can be integers 0 to 8 (inclusiv ...
I have just started learning C++ and trying to learn the syntax. The aim is to keep making the user ask over and over until they input either 0 or ...
I want to write a function that gets a set of integers and saves them to a vector. To get the integers I'm using a while loop. Enter the vector elem ...
As a beginner i am exploring multiple methods to increase my clarity, so i did this question. // no problem with this looping method vector <vecto ...
I want to get the sum of the individual digits of an ID entered by the user. So far this is the code I have, and my code can count the number of chara ...
Have 2 functions - fill() and Sum(). When Sum() is called after fill(), I get (!cin). I found that when I replace while (cin>>u){} with cin> ...
Working on a DLL here, using AllocConsole to create a console window. To initialize the console, I used this code below: I query for input normally ...