[vtkusers] (no subject)

jiang-gx jxjx at sjtu.edu.cn
Fri May 28 23:52:26 EDT 2004


hi everyone:
      i am coding my programe on the MFC. To change some feature, i  wrote a new class vtkInteractorStyleUnicam1 inheriting from	vtkInteractorStyleUnicam. in the .cpp file  i used the macro: vtkStandardNewMacro(vtkInteractorStyleUnicam1);  but the compiler throwes an error at this line saying"E:\kk\vtkInteractorStyleUnicam1.cpp(58) : error C2660: 'new' : function does not take 3 parameters"
what is the cause of the problem? can anyone help me? thanks!


further information: i extent the macro     vtkStandardNewMacro(vtkInteractorStyleUnicam1)   to:
vtkInteractorStyleUnicam1* vtkInteractorStyleUnicam1::New() 
  { 
    vtkObject* ret = vtkObjectFactory::CreateInstance("vtkInteractorStyleUnicam1");
    if(ret) 
    { 
      return static_cast<vtkInteractorStyleUnicam1*>(ret); 
    } 
    
	return new vtkInteractorStyleUnicam1;         //*****
 } 

 and the same error occured at the //***** line;



        jiang-gx
        jxjx at sjtu.edu.cn
          2004-05-29


More information about the vtkusers mailing list