Hey, I have class Timeprice, and the following code is
can anybody explain to me why the call f(data[0]) didn't execute? Thanks!Code:vector<Timeprice> data;
void f(const Timeprice& tp);
f(data[0]); // after executing operator[], it exit immediately, it didn't go into the function f() at all
Timeprice aa = data[i];
Timeprice& bb = data[i];
f(aa);
f(bb); //both call is respected