Answers for "how to get an input in c++ from the console"

C++
2

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);
}
Posted by: Guest on April-08-2021

Code answers related to "how to get an input in c++ from the console"

Browse Popular Code Answers by Language