[vtkusers] Strange compile problem for callback function based on vtkCommand

Øystein Skotheim oystein+vtk at edge.no
Thu Dec 15 05:56:23 EST 2005


Hello. I am trying to write a callback function. According to the VTK
User's Guide I derive it from vtkCommand.

However, I get a strange compile error on the line that says "return new
vtkMyCallback":

error C2660: 'vtkObjectBase::operator new' : function does not take 3
arguments

Does anyone have a clue what is going on here? Below is the very simple
code I tried to compile:

class vtkMyCallback : public vtkCommand
{
public:
   static vtkMyCallback* New() { return new vtkMyCallback; }
   virtual void Execute(vtkObject *caller, unsigned long, void *callData)
	{ printf("In Execute()"); }
};

I use Visual Studio .NET 2003 and VTK from the 5.0 branch in CVS.

Regards,
-- 

Øystein Skotheim
Scientist, Optical Measurement Systems and Data Analysis
SINTEF ICT [http://www.sintef.com/omd]



More information about the vtkusers mailing list