Wednesday, 25 January 2012

error C2061: syntax error : identifier 'THIS_FILE' c++

To fix this move all your include files above the #ifdef _DEBUG  and using namespace std below. e.g.

#include "stdafx.h"
#include <stdlib.h>
#include <string>
#include <iostream>


#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


using namespace std;

No comments:

Post a Comment