fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. sting name = "";
  7. cout<<"Whats your name?"<<endl;
  8. cin<<name;
  9. cout<<"Hello, " name<<endl;
  10. return 0;
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:6:2: error: 'sting' was not declared in this scope
  sting name = "";
  ^
prog.cpp:8:6: error: 'name' was not declared in this scope
 cin<<name;
      ^
prog.cpp:9:18: error: expected ';' before 'name'
  cout<<"Hello, " name<<endl;
                  ^
stdout
Standard output is empty