I should probably try it, but I would think that if a function has default arguments and is called from a different CPP file, then the default values would need to be in the function prototype. My thinking is that the default values are inserted by the compiler as it compiles the calling code, otherwise the linker would need to differentiate between calls with all the arguments and calls with missing arguments which require the default parameters.
This would raise the interesting (and scary) prospect of being able to define different default parameter values in different CPP files by using different function prototypes for the same function! However I would not recommend using this - just include the required argument value in the call.
Trevor
↧
By: Trevor
↧