What does this mean?

inline double FittingMod::model(const std::vector<double>& t, const std::vector<double>& p)

could someone explain this, piece by piece? why is there space between & and t? Is it a reference pointer?
inline keyword is telling compiler to not call function but simply copy its body into the code everytime it is exectued.
double is the type of returning value
FittingMod:: is the class name to which this method belong
const std::vector<double>& t is constant (read only) reference to std::vector holding double types.
const std::vector<double>& p is same as previous.

when you place & or * there is no need for space.

int *p is the same as int*p or int * p, although i prefer to use int* p since pointer is type of variable.
Last edited on
thank you very much!
Topic archived. No new replies allowed.