[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: STL, memory allocation, and cleanup (gcc 3.0?)

Previously elf@florence.buici.com wrote:
> #include <stdio.h>
> #include <stdlib.h>

This isn't proper c++, you need to use cstdio and cstdlib as well
as the std namespace.

> #define free _free
> #define malloc _malloc
> #define realloc _realloc

You're better of passing a custom allocator to the templates
instead of playing tricks like this.


 /wichert@wiggy.net         This space intentionally left occupied \
| wichert@deephackmode.org            http://www.liacs.nl/~wichert/ |
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0  2805 3CB8 9250 2FA3 BC2D |

Reply to: