Click here to Skip to main content
15,886,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioninsert bitmap on SDI Pin
Amin.Abdi22-Aug-09 21:15
Amin.Abdi22-Aug-09 21:15 
AnswerRe: insert bitmap on SDI Pin
Hamid_RT22-Aug-09 22:18
Hamid_RT22-Aug-09 22:18 
GeneralRe: insert bitmap on SDI Pin
Amin.Abdi22-Aug-09 22:39
Amin.Abdi22-Aug-09 22:39 
GeneralRe: insert bitmap on SDI Pin
Iain Clarke, Warrior Programmer23-Aug-09 4:23
Iain Clarke, Warrior Programmer23-Aug-09 4:23 
GeneralRe: insert bitmap on SDI Pin
Amin.Abdi23-Aug-09 4:34
Amin.Abdi23-Aug-09 4:34 
GeneralRe: insert bitmap on SDI Pin
Hamid_RT27-Aug-09 5:21
Hamid_RT27-Aug-09 5:21 
QuestionFunction overloading.. Pin
kumar sanghvi22-Aug-09 3:28
kumar sanghvi22-Aug-09 3:28 
AnswerRe: Function overloading.. Pin
Rajesh R Subramanian22-Aug-09 4:35
professionalRajesh R Subramanian22-Aug-09 4:35 
kumar sanghvi wrote:
void function(int y,int w)
{
printf("int function");

}

void function(float y,float w)
{
printf("float function");
}



The problem is that the compiler is not going to understand which overload of this function are you wanting to call (1.2 can be truncated to integer, therefore the confusion). You will need to be more explicit.

kumar sanghvi wrote:
function(1.2,2.2);


Try function((float)1.2, float(2.2)); instead. To make things clearer:
int main()
{
float f1=1.2, f2=2.2;
int n1=22, n2=23;

function(f1, f2); //f1 and f2 are floats, so the compiler will call the float version.
function(n1, n2); //Similarly, the compiler would call the int version.
function((int)f1, (int)f2); //int version would be called.
function((float)n2, (float)n1); //float version would be called
//function(f1, n2); //Ambiguous! If you enable this, the program won't compile!
return 0;
}



It is a crappy thing, but it's life -^ Carlo Pallini

AnswerRe: Function overloading.. Pin
Stuart Dootson22-Aug-09 6:46
professionalStuart Dootson22-Aug-09 6:46 
Questionpointer Pin
kumar sanghvi21-Aug-09 23:56
kumar sanghvi21-Aug-09 23:56 
AnswerRe: pointer [modified] Pin
Rajesh R Subramanian22-Aug-09 0:05
professionalRajesh R Subramanian22-Aug-09 0:05 
GeneralRe: pointer Pin
kumar sanghvi22-Aug-09 0:21
kumar sanghvi22-Aug-09 0:21 
GeneralRe: pointer Pin
Rajesh R Subramanian22-Aug-09 2:10
professionalRajesh R Subramanian22-Aug-09 2:10 
GeneralRe: pointer Pin
harold aptroot22-Aug-09 9:04
harold aptroot22-Aug-09 9:04 
GeneralRe: pointer Pin
Rajesh R Subramanian22-Aug-09 19:05
professionalRajesh R Subramanian22-Aug-09 19:05 
AnswerRe: pointer Pin
Rajesh R Subramanian22-Aug-09 19:06
professionalRajesh R Subramanian22-Aug-09 19:06 
AnswerRe: pointer Pin
harold aptroot23-Aug-09 7:54
harold aptroot23-Aug-09 7:54 
GeneralRe: pointer Pin
Rajesh R Subramanian23-Aug-09 8:13
professionalRajesh R Subramanian23-Aug-09 8:13 
GeneralRe: pointer Pin
harold aptroot23-Aug-09 8:40
harold aptroot23-Aug-09 8:40 
QuestionHRESULT:0x8007007E Pin
MozhdehQeraati21-Aug-09 18:32
MozhdehQeraati21-Aug-09 18:32 
AnswerRe: HRESULT:0x8007007E Pin
Code-o-mat21-Aug-09 22:03
Code-o-mat21-Aug-09 22:03 
AnswerRe: HRESULT:0x8007007E Pin
Hristo-Bojilov22-Aug-09 6:02
Hristo-Bojilov22-Aug-09 6:02 
GeneralRe: HRESULT:0x8007007E Pin
MozhdehQeraati23-Aug-09 18:11
MozhdehQeraati23-Aug-09 18:11 
GeneralRe: HRESULT:0x8007007E Pin
Hristo-Bojilov24-Aug-09 10:16
Hristo-Bojilov24-Aug-09 10:16 
QuestionCreating an object using a reference Pin
thelonesquirrely21-Aug-09 8:28
thelonesquirrely21-Aug-09 8:28 

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.