hi all,
i am having a class and i want to impliment 2 overloaded constructors as:
in .h file:
Document(const char* filename=NULL);
Document(const wchar_t* filename=NULL);
in .cpp file
Document:: Document( const char* filespec )
{
m_pdoc = NULL;
load( filespec );
}
Document:: Document( const wchar_t* filespec )
{
m_pdoc = NULL;
load( filespec );
}
the load function is also overloaded.
but it gives me warning saying:
warning C4520: 'Document' : multiple default constructors specified
and error saying:
error C2668: 'Document:: Document' : ambiguous call to overloaded function
where i am going wrong?