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

徐志 華 zionman.hsu at gmail.com
Thu Apr 28 05:49:22 EDT 2016


Thank everyone.
I check my default settings of my vs2008 ,  found that I had set a
nondocumented default macro for new function ,  in a closed up project ,
which I forgotton already.
Pardon for such a foolish mistake.
2016年4月28日 上午12:00於 "John Platt" <jcplatt at dsl.pipex.com>寫道:

> Hi,
>
> The files compile OK on my VS2008 after removing the symbol
> VTKINTERACTIONSTYLE_EXPORT (not defined in my project). Sorry I can't be
> more helpful.
>
> John.
>
> On 27/04/2016 15:38, 徐志華 wrote:
>
> 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 <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> <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 athttp://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
>
>
>
>
>
> _______________________________________________
> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160428/65a7eaff/attachment.html>


More information about the vtkusers mailing list