question:
online solution:
1. No
added
#include <iostream>
using namespace std;
or
2. The order of the included libraries needs to be adjusted
//These will not work.
#include <iostream>
using namespace std;
int main () {
cout << "hey" << endl;
return 0;
}
#include <iostream>
#include "stdafx.h"
using namespace std;
int main () {
cout << "hey" << endl;
return 0;
}
//This will do.
#include "stdafx.h"
#include <iostream>
using namespace std;
int main () {
cout << "hey" << endl;
return 0;
}
final solution: my own reasons… Orz)
open iostream file. I commented out part of the code for a project…
just uncomment it.
Read More:
- Error C2065 ‘cout’: undeclared identifier
- Error 3 error C2065: ‘endl‘ : undeclared identifier-Error 2 error C2065: ‘cout‘ : undeclared identif
- Error c2065: ‘new’: undeclared identifier, mainly because it is a. C file
- error C2065: ‘_beginthread‘ : undeclared identifier
- error C2065: “_ LPW “: undeclared identifier
- Format control of cout cout.width () and cout.fill ()
- To solve the error of T2a w2a a2w, error c2065:_ LPW “: undeclared identifier
- Undeclared identifier CV in opencv4.2.0_ WINDOW_ AUTOSIZE
- “Undeclared identifier” still reported in declaration header file
- IOS reverse error: use of undeclared identifier ‘mshookivar’
- Error in the latest version of ffmpeg: ‘codec’_ FLAG_ GLOBAL_ Header ‘undeclared identifier solution
- error: `cout’ was not declared in this scope
- “Error: ` cout ‘was not declared in this scope”
- winnt.h C2146 error C2146: syntax error : missing ‘;’ before identifier ‘PVOID64’
- Error c3861: identifier not found | identifier not found
- Successfully resolved error c3861: ‘printf’: identifier not found
- Error c3861: “strcasecmp”: identifier not found
- VS2010 library function problem: objidl. H (11266): error c2061: syntax error: identifier ‘__ RPC__ out_ xcount_ part’
- Error c2061: syntax error: identifier ‘this_ FILE’
- error C2146: syntax error : missing ‘;’ before identifier ‘fd’