C-Death
I love you
- Reaction score
- 45
Hello everyone. I've just recently began learning C++.
Now, my problem is when I compile and run my code (using Dev C++)
Everything after
Thanks for any help and happy holidays
Now, my problem is when I compile and run my code (using Dev C++)
Code:
#include <iostream>
using namespace std;
int main()
{
cout <<"Greetings adventurer, press enter to continue. . .\n";
cin.get();
int name;
cout <<"Enter the name of your hero. . . ";
cin >> name;
cout <<"So, young " << name;
cout <<"you are entering a dangerous world indeed.\n";
cin.get();
}
int level()
{
cout <<"So, tell me adventurer, what village are you from?\n";
int villagefrom;
cin >> villagefrom;
cout <<"You're from" << villagefrom;
cout <<"Can't say as I've ever been there\n";
cin.get();
}
Everything after
Just flashes and the program ends. I'm sure it's something stupid"cout <<"Enter the name of your hero. . . ";
Thanks for any help and happy holidays