I have a quiet simple question. I have a class, which represents curves, it has an Xaxis vector and an Yaxis vector. I would like to make a constructor for this class, which gets a function as a parameter, and "builds" the curve.ű
For example, like this way:
Curve a(sin);
and my constructor would look like:
Curve::Curve(--the part what i need to know--, size_t xsize)
{
for(int i=0;i<xsize;i++)
{
Xaxis.push_back(i);
Yaxis.push_back(--the function given in the parameter 1---(i));
}
}
I hope there is a way to implement that. Thanks for the help in advance.