Hi
I am trying to identify memleaks in my c++ program. I use Visual Studio 2008.
I have found a few tutorials dealing with identifying memleaks while using new, not malloc, for memory allocation and this is what i have defined on top of my main:
#define __STDC_CONSTANT_MACROS
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#define new DEBUG_NEW
#endif
unfortunately I get tons of errors, which you can see here: http://pastebin.com/9ax90VTg
But I think I have found the problem: there is neighter __FILE__ nor __LINE__ defined. When I click "RMB->go to definition" OR "RMB->go to declaration" on __FILE__ or __LINE__ i get: "the symbol '__FILE__' is not defined" and the symbol '__LINE__ ' is not defined respectively.
How should I solve this?
View the full article




Sign In
Create Account
Back to top







