Hello! Everybody,
I started to unuderstand the codings in simple_plot example wherein i tried to understand simple.cpp code but had few problems. Those are: -
1.) In this code: -
public:
SimpleData(double(*y)(double), size_t size):
d_size(size),
d_y(y)
{
}
public:
SimpleData(double(*y)(double), size_t size):
d_size(size),
d_y(y)
{
}
To copy to clipboard, switch view to plain text mode
Here i came to know that its a constructor with 2 variables, d_size & d_y are declared globally. But main point is i didn't understand " double(*y)(double) " declaration. Also is size_t a new variable introduced in Qwt, if yes what are its limitations?
2.) In this code: -
Const int nPoints=100;
cSin->setData(SimpleData(::sin, nPoints));
cCos->setData(SimpleData(::cos, nPoints));
Const int nPoints=100;
cSin->setData(SimpleData(::sin, nPoints));
cCos->setData(SimpleData(::cos, nPoints));
To copy to clipboard, switch view to plain text mode
Here i came to know that nPoints is an int variable with value=100. Also following 2 lines are setting data for those 2 curves. But main point is what type of arguments are sent here like "::sin" "::cos"& which subroutine is called to set the data actually?
Can anyone please help me out in understanding them.----> I will be obliged.
Thanks in Advance.
Bookmarks