function - Cannot understand a C++ line -
i reading c++ code , came across function:
double nm_poissons_ratio(double /*temp*/) { double pr(0.0); pr = 0.31; return pr; }
i don't understand effect of /* */ characters surround temp variable.
thanks
if write
double nm_poissons_ratio(double temp)
the compiler warning. unused variable.
in case, coder wanted retain signature reason, avoid warning. he/she therefore put comment show was.
why signature? it's hard know.
perhaps intermediate version of code, , he/she plans use parameter in future (this excellent case retain warning).
perhaps it's passed callback function expects specific signature.
Comments
Post a Comment