#include <iostream>bool foo(double & m){ m = 1.0; return true;}int main(){ double test = 0.0; std::cout << "Value of test is : \t" << test << "\tReturn value of function is : " << foo(test) << "\tValue of test : " << test << std::endl; return 0;}
Value of test is : 1 Return value of function is : 1 Value of test : 0
富国沪深
扬帆大鱼
相关分类