namespace does not exist
-
Hello, Could anyone tell me how to cope with this error message. the start of my code goes like
#pragma once using namespace std;
... I get the errormessage that the namespace does not exist, and msdn provide little information about this error message.error C2871: ´std´:a namespace with this name does not exist
Sorry if I provide to little code or further descriptions... But maybe somebody has a tips best regards doneirik -
Hello, Could anyone tell me how to cope with this error message. the start of my code goes like
#pragma once using namespace std;
... I get the errormessage that the namespace does not exist, and msdn provide little information about this error message.error C2871: ´std´:a namespace with this name does not exist
Sorry if I provide to little code or further descriptions... But maybe somebody has a tips best regards doneirikThat should compile OK on any machine. Exactly on what line did you get the error message? Maybe where the error is generated your code is at a different scope not within that of your "using" declaration? Maybe where the error is generated the header file with your "using" declaration is not included?
-
Hello, Could anyone tell me how to cope with this error message. the start of my code goes like
#pragma once using namespace std;
... I get the errormessage that the namespace does not exist, and msdn provide little information about this error message.error C2871: ´std´:a namespace with this name does not exist
Sorry if I provide to little code or further descriptions... But maybe somebody has a tips best regards doneirikthis can come from the files you really include. for example :
#include <string.h>
this will include all the C standard function to manipulate C-string (strcat(), strlen(), etc...) in the global namespace : ::strcat(), ::strlen(),...#include <CSTRING>
this will put the functions in thestd
namespace : std::strcat(), std::strlen(), ...
TOXCCT >>> GEII power
[toxcct][VisualCalc] -
Hello, Could anyone tell me how to cope with this error message. the start of my code goes like
#pragma once using namespace std;
... I get the errormessage that the namespace does not exist, and msdn provide little information about this error message.error C2871: ´std´:a namespace with this name does not exist
Sorry if I provide to little code or further descriptions... But maybe somebody has a tips best regards doneirikdoneirik wrote: Could anyone tell me how to cope with this error message. the start of my code goes like #pragma once using namespace std; ... I get the errormessage that the namespace does not exist, and msdn provide little information about this error message. error C2871: ´std´:a namespace with this name does not exist You probably should include a file with code in namespace std before 'using' namespace std, e.g.
#include <vector>
using namespace std;