Click here to Skip to main content
15,891,828 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: very odd vc 6 debugger behavior Pin
James R. Twine30-Oct-06 5:22
James R. Twine30-Oct-06 5:22 
AnswerRe: very odd vc 6 debugger behavior Pin
ns31-Oct-06 3:56
ns31-Oct-06 3:56 
AnswerRe: very odd vc 6 debugger behavior Pin
Jethro6331-Oct-06 2:25
Jethro6331-Oct-06 2:25 
GeneralRe: very odd vc 6 debugger behavior Pin
ns31-Oct-06 3:53
ns31-Oct-06 3:53 
GeneralRe: very odd vc 6 debugger behavior Pin
Jethro6331-Oct-06 4:03
Jethro6331-Oct-06 4:03 
AnswerRe: very odd vc 6 debugger behavior Pin
Jethro6331-Oct-06 4:09
Jethro6331-Oct-06 4:09 
GeneralRe: very odd vc 6 debugger behavior Pin
David Crow31-Oct-06 5:00
David Crow31-Oct-06 5:00 
QuestionConfusing about variable number of arguments, Pin
EzraYap30-Oct-06 4:57
EzraYap30-Oct-06 4:57 
<br />
#include <stdlib.h><br />
#include <stdarg.h><br />
#include <stdio.h><br />
<br />
int maxof(int, ...) ;<br />
void f(void);<br />
<br />
main(){<br />
        f();<br />
        exit(EXIT SUCCESS);<br />
}<br />
<br />
int maxof(int n_args, ...){<br />
        register int i;<br />
        int max, a;<br />
        va_list ap;<br />
<br />
        va_start(ap, n_args);<br />
        max = va_arg(ap, int);<br />
        for(i = 2; i <= n_args; i++) {<br />
                if((a = va_arg(ap, int)) > max)<br />
                        max = a;<br />
        }<br />
<br />
        va_end(ap);<br />
        return max;<br />
}<br />
<br />
void f(void) {<br />
        int i = 5;<br />
        int j[256];<br />
        j[42] = 24;<br />
        printf("%d\n",maxof(3, i, j[42], 0));// Anyone can explain this by step-by-step?<br />
}

Confused | :confused:

~~~@@@###EZRA###@@@~~~

AnswerRe: Confusing about variable number of arguments, Pin
David Crow30-Oct-06 5:16
David Crow30-Oct-06 5:16 
Questionc++ Pin
amylou30-Oct-06 4:18
amylou30-Oct-06 4:18 
AnswerRe: c++ Pin
David Crow30-Oct-06 4:33
David Crow30-Oct-06 4:33 
AnswerRe: c++ Pin
PJ Arends30-Oct-06 5:00
professionalPJ Arends30-Oct-06 5:00 
AnswerRe: c++ Pin
Eric Dahlvang30-Oct-06 5:07
Eric Dahlvang30-Oct-06 5:07 
AnswerRe: c++ Pin
Hamid_RT30-Oct-06 8:30
Hamid_RT30-Oct-06 8:30 
QuestionFinding the "order" of a floating point number...? Pin
Toastersparks30-Oct-06 3:32
Toastersparks30-Oct-06 3:32 
AnswerRe: Finding the "order" of a floating point number...? Pin
Niklas L30-Oct-06 4:28
Niklas L30-Oct-06 4:28 
GeneralRe: Finding the "order" of a floating point number...? Pin
Toastersparks2-Nov-06 0:32
Toastersparks2-Nov-06 0:32 
GeneralRe: Finding the "order" of a floating point number...? Pin
Niklas L2-Nov-06 1:19
Niklas L2-Nov-06 1:19 
QuestionProtection exec Pin
zarmin30-Oct-06 3:20
zarmin30-Oct-06 3:20 
AnswerRe: Protection exec Pin
TClarke30-Oct-06 4:53
TClarke30-Oct-06 4:53 
GeneralRe: Protection exec Pin
zarmin30-Oct-06 23:14
zarmin30-Oct-06 23:14 
GeneralRe: Protection exec Pin
TClarke30-Oct-06 23:39
TClarke30-Oct-06 23:39 
QuestionHow to add audio to wmv file? Pin
Hemant kulkarni30-Oct-06 3:04
Hemant kulkarni30-Oct-06 3:04 
AnswerRe: How to add audio to wmv file? Pin
Mark Salsbery30-Oct-06 5:18
Mark Salsbery30-Oct-06 5:18 
Questioninfo about __COUNTER__ macro Pin
manustone30-Oct-06 2:35
manustone30-Oct-06 2:35 

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.