What's wrong ?

I dont know what is wrong with my code so far...I just started the game and for some reason it says its failed .

// First Complex Game

#include <iostream>
#include <string>
using namespace std;

int main()
const int SMALLMOB_LOOT = 10;
const int LARGEMOB_LOOT = 15;
const int BOSS_LOOT = 30;
string character;

// Personalizing the character

cout << "\tWelcome To Huntswin! The Medieval School!\n";

cout << "\nWhat is your name young one?: ";
cin >> character;

cout << "\nWelcome " << character << " to Huntswin Medieval school!\n";

cout << "\nHuntswin offers three different courses here, here are you options:\n";
cout << "Guard , Archer, or Mage! Type the class you would want to be!(Case sensitive): ";

return 0;

closed account (Dy7SLyTq)
use getline(cin, string) instead of cin>> string. your probably typing in names with spaces
That didn't really help....but what did you mean by im typing names with spaces?
closed account (Dy7SLyTq)
could you post your code then? and i mean like did you type in for name: Bill Gates or something like that? a name that has a space
Topic archived. No new replies allowed.