const参照の初期化
#include <iostream> using namespace std; int One(const int &ret){ cout <<ret<<endl; return ret; } int main() { cout <<One(13) + 2<<endl; }
結果
13 15
#include <iostream> using namespace std; int One(const int &ret){ cout <<ret<<endl; return ret; } int main() { cout <<One(13) + 2<<endl; }
結果
13 15