Click here to Skip to main content
15,922,166 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: cstring to tchar conversion Pin
CPallini5-Feb-08 20:50
mveCPallini5-Feb-08 20:50 
AnswerRe: cstring to tchar conversion Pin
Rajkumar R4-Feb-08 21:08
Rajkumar R4-Feb-08 21:08 
GeneralRe: cstring to tchar conversion Pin
Francis K Antony4-Feb-08 23:11
Francis K Antony4-Feb-08 23:11 
QuestionRe: cstring to tchar conversion Pin
Rajkumar R4-Feb-08 23:27
Rajkumar R4-Feb-08 23:27 
GeneralRe: cstring to tchar conversion Pin
Francis K Antony4-Feb-08 23:48
Francis K Antony4-Feb-08 23:48 
QuestionRe: cstring to tchar conversion Pin
Rajkumar R4-Feb-08 23:58
Rajkumar R4-Feb-08 23:58 
GeneralRe: cstring to tchar conversion Pin
Cedric Moonen4-Feb-08 21:13
Cedric Moonen4-Feb-08 21:13 
GeneralAmbiguity issue Pin
George_George4-Feb-08 20:06
George_George4-Feb-08 20:06 
Hello everyone,


I think compiler is too strict in this case. You can see, no data member, no virtual function.

I am using Visual Studio 2008. The compiler error is simply because of Diamond pattern -- duplicate base class? Actually from logical point of view, there should be no ambiguity issue.

Any ideas?

class Base {
public:
	int foo() {cout << "Base" << endl;}
};

class Derived1: public Base
{
public:
	int foo() {cout << "Derived1" << endl;}
};

class Derived2: public Base
{
public:
	int foo() {cout << "Derived2" << endl;}
};

class Final: public Derived1, public Derived2 {
public:
	int foo() {cout << "Final" << endl;}
};

int main()
{
	Final f;
	Final* p = &f;
	Base* pb = p; //error C2594: 'initializing' : ambiguous conversions from 'Final *' to 'Base *'
	return 0;
}



thanks in advance,
George
GeneralRe: Ambiguity issue Pin
Rajkumar R4-Feb-08 21:02
Rajkumar R4-Feb-08 21:02 
QuestionAccessing string table from the DLL Pin
abhijitr4-Feb-08 19:54
abhijitr4-Feb-08 19:54 
QuestionRe: Accessing string table from the DLL Pin
Rajkumar R4-Feb-08 21:14
Rajkumar R4-Feb-08 21:14 
GeneralRe: Accessing string table from the DLL Pin
abhijitr4-Feb-08 22:06
abhijitr4-Feb-08 22:06 
GeneralRe: Accessing string table from the DLL Pin
Rajkumar R4-Feb-08 23:21
Rajkumar R4-Feb-08 23:21 
AnswerRe: Accessing string table from the DLL Pin
abhijitr5-Feb-08 0:01
abhijitr5-Feb-08 0:01 
Generalcopy CString value to char Pin
Anu_Bala4-Feb-08 18:57
Anu_Bala4-Feb-08 18:57 
GeneralRe: copy CString value to char Pin
Maxwell Chen4-Feb-08 19:01
Maxwell Chen4-Feb-08 19:01 
GeneralRe: copy CString value to char Pin
Parthi_Appu4-Feb-08 19:15
Parthi_Appu4-Feb-08 19:15 
QuestionRe: copy CString value to char Pin
CPallini4-Feb-08 23:10
mveCPallini4-Feb-08 23:10 
Questionhow to get index of minimum of one array Pin
gentleguy4-Feb-08 16:22
gentleguy4-Feb-08 16:22 
AnswerRe: how to get index of minimum of one array Pin
Steve Echols4-Feb-08 17:30
Steve Echols4-Feb-08 17:30 
GeneralRe: how to get index of minimum of one array Pin
gentleguy4-Feb-08 20:59
gentleguy4-Feb-08 20:59 
AnswerRe: how to get index of minimum of one array Pin
pierre_ribery4-Feb-08 20:54
pierre_ribery4-Feb-08 20:54 
QuestionGet coordinate of mouse click Pin
Kennis4-Feb-08 14:22
Kennis4-Feb-08 14:22 
GeneralRe: Get coordinate of mouse click Pin
Steve Echols4-Feb-08 17:36
Steve Echols4-Feb-08 17:36 
QuestionWhat's the rule for "cleaning" and "rebuilding"...? Pin
@largeinsd4-Feb-08 13:46
@largeinsd4-Feb-08 13:46 

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

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