everything has either an "identifier not found" or "undeclared identifier" error

This is the first time I have ever encountered something like this.
Everything has either an "identifier not found" or "undeclared identifier" error.
my code is:

1
2
3
4
5
6
7
8
9
10
11
#include <string>
#include <iostream>

using namespace std;

int main(){
	string input;
	cout << "What is your name?" << endl;
	getline(cin, input);
	cout << "Hello " << input << "!" << endl;
}


I have already tried switching over to std:: (yes, I know that using "using namespace std" is a horrible crime in c++ but that's not my problem... I think) and everything that I could find didn't help much.

edit: to show how horrible this is,
 
Error	14	error C2065: 'endl' : undeclared identifier
Last edited on
It's not "import." It's "include." Also, your main function should be lowercase, because it does make a difference if it isn't.
Last edited on
and "Main" is "main"
main() can't be static. And it's #include , not import. #import is a compiler-specific extension.
http://stackoverflow.com/questions/172262/c-include-and-import-difference
I apologize, I had some other #includes that I left out since they aren't part of the problem, so I added those in quickly. They are actually #include though. Aside from that, any help on my main problem?
Did you recompile? I don't see any error.
did you change any settings in you IDE ?
Topic archived. No new replies allowed.