HylaFAX The world's most advanced open source fax server

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

Re: Beginning compile problems -- some progress

Okay, I have now learned [from the C++ FAQ, section 11.10] that the
       ITEM * obj = new(ptr) ITEM;
is a "Placement New", where (in this case, substituting RegExPtr for ITEM),
we have something like "the variable 'obj' is a pointer to an 'new' object
of class 'RegExPtr,' and it is actually located at memory location 'ptr.' 
The other line of code:
       ITEM * obj = new(q) ITEM(*p);
means essentially the same thing, but instructs the newly-created RegExPtr
instance to execute some unknown (to me, that is) function during
construction with the value pointed to by p.

So now that I understand (somewhat) what's supposed to be happening, I now
have to figure out why I get the "too many arguments" error during compile:

     In method `void RegExArray::createElements(void *, unsigned int)':
        too many arguments for function `void * operator new(long unsigned

The call to new() only even has a single argument, so why am I getting this




Project hosted by iFAX Solutions