I have a .cc file which uses both iostream and malloc. How can I compile that? Using g++, it says
error: 'malloc' was not declared in this scope
using gcc, it says
fatal error: iostream: No such file or directory
The source code is located at http://sequitur.info/sequitur_simple.cc
I changed malloc to new and chaned free to delete, but I still get a lot of errors. For example
/usr/include/c++/4.6/new:103:14: error: initializing argument 2 of âvoid* operator new(std::size_t, void*)â [-fpermissive]
#includethe appropriate file.mallocis valid c++#includeing<stdlib.h>helps, also go for<string.h>as you're usingmemset(). I compiled the code doing those mods.