whats going on here?

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

{
const string FIRST_NAME = "Erika";
const string LAST_NAME = "Jepsen";
const int SCORE_1 = 27;
const int SCORE_2 = 24;
const int HANDICAP = 2;
}

cout << "The mean score is " << (SCORE_1 * SCORE_2) / 2, endl;
cout << "The final score is " << ((SCORE_1 * SCORE_2) / 2) + HANDICAP, endl;


game.cpp:5: error: expected unqualified-id before â{â token
game.cpp:13: error: expected constructor, destructor, or type conversion before â<<â token
game.cpp:14: error: expected constructor, destructor, or type conversion before â<<â token


Im REALLY bad with compile errors
You forgot to place the code into a function.
what should it look like for it to work?, whats the best function to use?
I think that the best function is main.:)
Topic archived. No new replies allowed.