I have tried to add a new .cpp file into a C project in Visual Studio, with the following code:
#include <iostream>
using namespace std;
int main(int argc, char **argv)
{
cout << "Hello World!" << endl;
return 0;
}
However, the #include <iostream>
alone produced 100+ errors, so I had to comment that to see if that was the problem. After doing so, this new error popped up: identifier "using" is undefined
. I am guessing it is either because the project was somehow configured for C, or it is because there are things prepended to the file by the preprocessor that I am unaware of. How may I solve this?