[vtkusers] Error C2660: 'vtkObject::operatpr new': do not take 3 patameters

徐志華 zionman.hsu at gmail.com
Wed Apr 27 10:38:40 EDT 2016


Attached is the header file and implementation file that cause error
I test it with VS 2008, and it caused Error C2660, but, test it with VS
2015, It's OK, and no Error message generates.

-----Original Message-----
From: Cory Quammen [mailto:cory.quammen at kitware.com] 
Sent: Wednesday, April 27, 2016 9:15 PM
To: 徐志 華
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Error C2660: 'vtkObject::operatpr new': do not take
3 patameters

>From the code you have shared, I do not see what would cause the error
you report.

Could you post the header file and the portion of the code in the
implementation file (.cxx) leading up to and including
vtkStandardNweMacro?

Thanks,
Cory

On Wed, Apr 27, 2016 at 4:19 AM, 徐志 華 <zionman.hsu at gmail.com> wrote:
> Hi,
> I had a class derived from vtkInteractorStyleRubberBandPick defined as
> following:
>
> class myAreaSelector : public vtkInteractorStyleRubberBandPick
> {
> public:
>   vtkTypeMacro(myAreaSelector, vtkInteractorStyleRubberBandPick);
>   static myAreaSelector *New();
> .....
> };
>
> And implemented this new function with:
>
> vtkStandardNewMacro(myAreaSelector);
>
> Which leads to error C2660 : 'vtkObject::operator new' not take 3
parameters
>
> Is there any wrong doings with this implementation?
>
> Any suggestion to overcoming this error message is welcome.
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>



-- 
Cory Quammen
R&D Engineer
Kitware, Inc.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: myAreaSelector.h
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160427/b6424186/attachment.h>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: myAreaSelector.cpp
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160427/b6424186/attachment.ksh>


More information about the vtkusers mailing list