NULL must be defined?

For some reason, my code requires NULL to defined. This is a first for me. I thought NULL was always already defined to 0.


paged.h
1
2
3
4
#pragma once

// Always set sizes to 16384 bytes
void* getPool() { return malloc(16384); }


my_heap.h
1
2
3
4
5
6
7
#pragma once

#define NULL 0

#include "paged.h"

static void* myHead = NULL;
C++: favour nullptr over NULL

C: #include <stddef.h> or one of the other headers listed here: http://en.cppreference.com/w/c/types/NULL
Topic archived. No new replies allowed.