Practice failure?

Was trying this switch code online, but it fails for me, saying "unresolved externals". What is missing? my Visual Express doesn't actually show me any errors.

//switch case
#include <iostream>
using namespace std;

int main()
{
int a;

cout << "What time of day is it? \n";
cout << "1) Morning \n";
cout << "2) Afternoon \n";
cout << "3) Evening \n";
cout << "Enter a choice: \n";
cin >> a;

switch (a)
{
case 1:
cout << "Good Morning!";
break;
case 2:
cout << "Good Afternoon!";
break;
case 3:
cout << "Good Evening!";
break;

default:
cout << "Not a valid entry....";
break;
}
}
http://www.cplusplus.com/forum/articles/40071/#msg216270
The code builds fine, so it may be a problem with the build command that you are using (maybe you treat it as a C program, instead of C++)
Last edited on
Not sure what it was. I closed the application, and opened a new project, and it ran just fine. Not sure why it was mad at me. Thanks.
Topic archived. No new replies allowed.