C + + can be:
Void func (... The form of) {}
-- -- -- -- -- -- -- --
According to the variable parameter macro implementation, having at least one parameter is needed to function as parameters extraction parameters on the stack (reference address), the c + + (... ) is how to achieve?
Void func (... ) {
//how to extract parameter?
}
Intmain () {
Func (" gnome male - ", "20, 12.00, 500);
return 0;
}
Due to the above is not clearly parameters, can only see function normal pass parameters, macro and variable parameter, but I don't know this (... ) how can extract parameter
Can't use va_list, va_start
CodePudding user response:
Grammar can be so, but no actual application scenarioCodePudding user response:
https://blog.csdn.net/qq_40946921/article/details/90648688List of initialization using c + + 11 and 17 any c + + class, can realize the variable argument list, but I feel the effect is not big
CodePudding user response:
I use this app # CSDN# found have technical content of the blog and friends to seek common to "c + + 17 any class (universal containers), a", gathered together at https://blog.csdn.net/qq_40946921/article/details/90646022CodePudding user response: