cpp get user input in console code example
Example: c++ read console input
// Include the library for console in-/outputs
#include <iostream>
// Include the libary for strings
#include <string>
// Main function
int main()
{
// Initialize variable
std::string value;
// Read from console
std::getline(std::cin, value);
}