Local function definitions typically mean your braces are messed up. Indeed, this is the case.
Code:int Check_Exp() { int your_exp = You.GetExp(); enum {level1 = 20, level2 = 60, level3 = 100}; switch (your_exp) // unclosed switch { case level1: cout << "Place holder one"; break; case level2: cout << "Place holder two"; break; case level3: cout << "Place holder three"; break; default:cout << "Default"; // should close it here return your_exp; }