Friday, December 17, 2010

error C2512: 'class name' : no appropriate default constructor available

In MFC if we work on Single Document Interface(SDI). then if we wish our document to permanent storage then we add a macros in Doc.cpp file
"IMPLEMENT_SERIAL(classname,baseclassname,scemanumber)";

and some times we response a error message like this.

error C2512: 'classname' : no appropriate default constructor available
SDIView.cpp

and some times we confused that we will used constructor in this class. but this constructor is parametrized constructor to used default constructor simply by this method

classname(){}

your error is removed.



Visual Studio Resource error "opened in another editor"

Their are some times when we used VS and mostly programming in MFC. then their is a error arrived on the resource editor that ""opened in another editor" like.






To remove this error simply close all files of project and then VS. again reopen VS and reopen project your resource error will removed automatically.