Okay, I've been going back to the basics trying to get a better understanding of what I'm doing. So I have three questions.
why are compilers "happy" to compile something like i = MAX;?
how does the compiler know what max is?
how does this relate to compiler errors like "function definition not found, assuming external"?
what I understand is that because i is the variable assigned to max, and max is defined in stdio.h, the compiler will run it (of course with other code to go along with it). correct? however i'm not quite sure about the last question. is it because the function definition isn't contained in stdio.h and it is wanting another library to be included for the function? or is it that the person writing the code has not defined the parameters of the function?
Question
Terabojin
Okay, I've been going back to the basics trying to get a better understanding of what I'm doing. So I have three questions.
why are compilers "happy" to compile something like i = MAX;?
how does the compiler know what max is?
how does this relate to compiler errors like "function definition not found, assuming external"?
what I understand is that because i is the variable assigned to max, and max is defined in stdio.h, the compiler will run it (of course with other code to go along with it). correct? however i'm not quite sure about the last question. is it because the function definition isn't contained in stdio.h and it is wanting another library to be included for the function? or is it that the person writing the code has not defined the parameters of the function?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts