I am having a problem with trying to typedef myself a nice handy tstring (see below)
#ifndef _NISAMPLECLIENT_H_
#define _NISAMPLECLIENT_H_
#include <windows.h>
#include <stdlib.h>
using namespace std; // ERROR here (1)
#ifdef _UNICODE
#define CommandLineToArgv CommandLineToArgvW
#else
#define CommandLineToArgv CommandLineToArgvA
#endif
typedef basic_string<TCHAR> tstring; // ERROR HERE (2)
I get a compiler error when trying to compile this. The error at "ERROR here (1)" is :
Error 3 error C2871: 'std' : a namespace with this name does not exist \nisampleclient\nisampleclientdefs.h 16
If I remove the using namespace std;
declaration and change ERROR HERE (2) to say typedef std::basic_string<TCHAR> tstring;
then I get an error:
Error 3 error C2653: 'std' : is not a class or namespace name \nisampleclient\nisampleclientdefs.h 23
at that point instead.
Thanks in advance. :)