Click here to Skip to main content
15,927,593 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC ActiveX Control with Visual Studio 2005 Pin
surfman1928-Mar-06 7:43
surfman1928-Mar-06 7:43 
GeneralRe: MFC ActiveX Control with Visual Studio 2005 Pin
Kurt _B28-Mar-06 8:11
Kurt _B28-Mar-06 8:11 
GeneralRe: MFC ActiveX Control with Visual Studio 2005 Pin
surfman1928-Mar-06 8:18
surfman1928-Mar-06 8:18 
GeneralRe: MFC ActiveX Control with Visual Studio 2005 Pin
Kurt _B28-Mar-06 8:34
Kurt _B28-Mar-06 8:34 
GeneralRe: MFC ActiveX Control with Visual Studio 2005 Pin
surfman1928-Mar-06 8:55
surfman1928-Mar-06 8:55 
GeneralRe: MFC ActiveX Control with Visual Studio 2005 Pin
Kurt _B28-Mar-06 9:13
Kurt _B28-Mar-06 9:13 
GeneralRe: MFC ActiveX Control with Visual Studio 2005 Pin
surfman1928-Mar-06 9:55
surfman1928-Mar-06 9:55 
QuestionOverriding Functions with variable argument list. Pin
Suyash28-Mar-06 4:22
Suyash28-Mar-06 4:22 
I had a understanding that overriding the the function with variable argument list will result in to ambiguity. However when i tried to compile and run following code on VC++ 6.0, its working as expected :

/////////////////////////////////////
void Func1( int i, ... )
//Lets refer it as Func1VariableArg
{
// do something.
}

void Func1( int i, int j)
//Lets refer it as Func1FixedArg
{
// Do something.
}

class A
{
};

int main(int argc, char* argv[])
{

Func1(1, 1); // Func1FixedArg is called as expected.

Func1(1, "1"); // Func1VariableArg is called as expected.

A a;
Func1(1, a); // Func1VariableArg is called as expected.

// This is the spoil spot
Func1(1, 1.0)// here we would expect Func1VariableArg to
//be called as second argument is double, however compiler
// implicitely typecasts it to int and calls the Func1FixedArg.
// however a warning for the same is issued at complie time.
return 0;
}
/////////////////////////////////////

Some one has any comments about this practice. Do we have any issues in this practice ?, any comments from C++ language specifications on this.



Thanks -
Suyash
AnswerRe: Overriding Functions with variable argument list. Pin
toxcct28-Mar-06 5:09
toxcct28-Mar-06 5:09 
Questioncredentials Pin
RomTibi28-Mar-06 4:20
RomTibi28-Mar-06 4:20 
QuestionWriting 64-bit code with VS 2005 Standard ? Pin
Defenestration28-Mar-06 4:19
Defenestration28-Mar-06 4:19 
AnswerRe: Writing 64-bit code with VS 2005 Standard ? Pin
Defenestration28-Mar-06 4:30
Defenestration28-Mar-06 4:30 
GeneralClicket police! Pin
Trollslayer28-Mar-06 7:26
mentorTrollslayer28-Mar-06 7:26 
QuestionProfiling code in VC++ 2005 ? Pin
Defenestration28-Mar-06 4:16
Defenestration28-Mar-06 4:16 
QuestionHow to pass array as a reference parameter? Pin
Ming Luo28-Mar-06 3:18
Ming Luo28-Mar-06 3:18 
AnswerRe: How to pass array as a reference parameter? Pin
toxcct28-Mar-06 3:37
toxcct28-Mar-06 3:37 
AnswerRe: How to pass array as a reference parameter? Pin
BadKarma28-Mar-06 3:53
BadKarma28-Mar-06 3:53 
AnswerRe: How to pass array as a reference parameter? Pin
khan++28-Mar-06 3:57
khan++28-Mar-06 3:57 
QuestionCreateProcess Pin
ilgale28-Mar-06 3:12
ilgale28-Mar-06 3:12 
AnswerRe: CreateProcess Pin
Hamid_RT28-Mar-06 3:20
Hamid_RT28-Mar-06 3:20 
GeneralRe: CreateProcess Pin
ilgale28-Mar-06 3:25
ilgale28-Mar-06 3:25 
GeneralRe: CreateProcess Pin
Rage28-Mar-06 3:39
professionalRage28-Mar-06 3:39 
GeneralRe: CreateProcess Pin
ilgale28-Mar-06 3:48
ilgale28-Mar-06 3:48 
GeneralRe: CreateProcess Pin
Rage28-Mar-06 3:59
professionalRage28-Mar-06 3:59 
GeneralRe: CreateProcess Pin
ilgale28-Mar-06 4:06
ilgale28-Mar-06 4:06 

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.