fork download
  1. #include <iostream>
  2.  
  3. #include <cstring>
  4.  
  5.  
  6.  
  7. using namespace std;
  8.  
  9.  
  10.  
  11. int main()
  12.  
  13. {
  14.  
  15. char name[50];
  16.  
  17. char weapon[100];
  18.  
  19. char weapon_name[100];
  20.  
  21. cout<<"What do you want your hero's name to be?";
  22.  
  23. cin.getline (name, 50);
  24.  
  25. cout<<"I like that name!";
  26.  
  27. cout<<"What would you like your weapon to be?";
  28.  
  29. cin.getline (weapon, 100);
  30.  
  31. cout<<"That's my favourite weapon!";
  32.  
  33. cout<<"What would you like to name your weapon?";
  34.  
  35. cin.getline (weapon_name, 100);
  36.  
  37. cout<<"cool!";
  38.  
  39. cout<<"You shall be crowned: "<<name<<"the wielder of the"<<weapon<<"named"<<weapon_name";
  40.  
  41. cout<<"You may begin your adventure!\n";
  42.  
  43. cin.get();
  44.  
  45. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:39:89: warning: missing terminating " character [enabled by default]
prog.cpp:39:1: error: missing terminating " character
prog.cpp: In function ‘int main()’:
prog.cpp:41:1: error: expected ‘;’ before ‘cout’
stdout

Standard output is empty