Search
 
SCRIPT & CODE EXAMPLE
 

CPP

how to read a line from the console in c++

#include <string>
std::string str;
std::getline(std::cin, str);
// The output of std::getline(std::cin, str) will be stored in str.
Comment

PREVIOUS NEXT
Code Example
Cpp :: c++ type of a variable 
Cpp :: format c++ discord 
Cpp :: helloworld in c++ 
Cpp :: cpp take lambda as parameter 
Cpp :: c++ cli convert string to string^ 
Cpp :: iterate vector from end to begin 
Cpp :: c++ round number up 
Cpp :: replace komma with space C++ 
Cpp :: c++ print number not in scientific notation 
Cpp :: array 2d dynamic allocation c++ 
Cpp :: c++ mst kruskal 
Cpp :: check if an element is in a map c++ 
Cpp :: taking a vector in c++ containing element 
Cpp :: how to check if a value is inside an array in c++ 
Cpp :: wine linux 
Cpp :: character array to string c++ stl 
Cpp :: c++ for in 
Cpp :: c++ call by value vs call by reference 
Cpp :: convert all characters in string to uppercase c++ 
Cpp :: c++ vector fill 
Cpp :: flags for g++ compiler 
Cpp :: c++ function for checking if a sting is a number 
Cpp :: round up 2 digits float c++ 
Cpp :: minimum value in array using c++ 
Cpp :: c vs c++ 
Cpp :: update variable in const function C++ 
Cpp :: c++ vectors 
Cpp :: c++ pause linux 
Cpp :: string to upper c++ 
Cpp :: c++ double is nan 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =