Click here to Skip to main content
       

Managed C++/CLI

 
GeneralRe: c++/cli define new explicit implementation of a sealed method PinmemberJohn Schroedl11-Oct-12 3:29 
GeneralRe: c++/cli define new explicit implementation of a sealed method PinmemberMarius Bancila11-Oct-12 10:12 
GeneralRe: c++/cli define new explicit implementation of a sealed method PinmemberJohn Schroedl12-Oct-12 2:29 
GeneralRe: c++/cli define new explicit implementation of a sealed method PinmemberMarius Bancila11-Oct-12 21:35 
It doesn't work in MFC apps with /clr support.
 
1>.\mfc_mm_2008.cpp(38) : error C2059: syntax error : 'string'
1>.\mfc_mm_2008.cpp(38) : error C2091: function returns function
1>.\mfc_mm_2008.cpp(39) : warning C4569: 'IFoo::foo' : no members match the signature of the explicit override
1>.\mfc_mm_2008.cpp(39) : error C3671: 'FooDerived::foo' : function does not override 'IFoo::foo'
 
The reason is MFC is rewriting the new operator with
 
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
So anyone wanting to do this in MFC, make sure you don't have that replacement of new before your declaration of the new function definition.
GeneralRe: c++/cli define new explicit implementation of a sealed method PinmemberJohn Schroedl12-Oct-12 2:34 
GeneralRe: c++/cli define new explicit implementation of a sealed method PinmemberJohn Schroedl12-Oct-12 2:38 
Questionhow can we avoid error D8016 ? Pinmemberlitu kumar8-Oct-12 23:18 
AnswerRe: how can we avoid error D8016 ? PinmvpRichard MacCutchan9-Oct-12 0:18 
GeneralRe: how can we avoid error D8016 ? Pinmemberlitu kumar7-Nov-12 21:49 
GeneralRe: how can we avoid error D8016 ? PinmemberFreak3026-Nov-12 3:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.141015.1 | Last Updated 30 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid