Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

get line C++

// extract to string
#include <iostream>
#include <string>

int main ()
{
  std::string name;

  std::cout << "Please, enter your full name: ";
  std::getline (std::cin,name);
  std::cout << "Hello, " << name << "!
";

  return 0;
}
 
PREVIOUS NEXT
Tagged: #line
ADD COMMENT
Topic
Name
1+4 =