[ create a new paste ] login | about

Link: http://codepad.org/HJB163Ix    [ raw code | output | fork ]

C++, pasted on May 26:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef LEAK_DETECTION_GUARD
#define LEAK_DETECTION_GUARD


#include <new>
#include <cstdlib> // for malloc() and free()
#include <string.h>
typedef unsigned int DWORD;

#define MEMORY_LEAK_DETECTION
#ifdef MEMORY_LEAK_DETECTION

void* operator new[](DWORD siz, const char* file, long line);
inline void *  operator new(DWORD size, const char *file, int line);
void operator delete[](void* p) throw();
void operator delete (void *p) throw();
void DumpUnfreed();

#endif

#endif


Output:
1
2
In function `_start':
undefined reference to `main'


Create a new paste based on this one


Comments: