fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. string name;
  8.  
  9. cout << "Please enter name here: ";
  10. getline(cin, name);
  11. cout << name << endl;
  12.  
  13. return 0;
  14. }
Success #stdin #stdout 0.02s 2860KB
stdin
This is my name
stdout
Please enter name here: This is my name