Hi,
I'd like to know how printf works, i know how the "%i" and other things work; But how do the variables at the end get passed off as arguments, for example:
printf("%i", variable /* <<-- How would i do this variable argument? */);
If i wanted to make my own printf, The Prototype would look something like this:
void printf(char* String);
I know how to detect %i, %c and things like that, but when i do detect it - Where would i get the variable argument from? Do you know what i mean?
Where does the variable come from?
printf("String %i", /*Where does this Come from??*/);
Since the variable is not in the prototype, there would be a compiler error, so how does it work?
If you don't understand what i'm asking, just say and i'll try and rephrase it;
Please help if you can,
Cya.