Read and respond to this message at:
For some reaseon I use malloc() to allocate storage from the heap and then the
placement new syntax to create an object in the allocated space.
This works fine as long as I include <iostream> (even without "std::" qualifier
before malloc! perhaps irrelevant) but when I exchanged <iostream> for <cstdlib>
because all i need are the prototypes for malloc and free, then the compiler
generates this message:
<internal>:298: too many arguments to function `void* operator new(unsigned
os.cpp:298: at this point in file
(And malloc() now needs std:: as expected)
Line 297 and 298 reads:
void * buf_ptr = std::malloc( sizeof(OsSignal) + data_size );
OsSignal * sig_ptr = new (buf_ptr) OsSignal( _id, data_size );
Has anyone got a clue? So please help me out!
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
Get latest updates about Open Source Projects, Conferences and News.