Qwt setSamples() throws runtime error
Hi, I ran into a runtime error while calling setSamples function from my app.
Its like this -
Code:
m_scatter.curves[0].setSamples(&m_scatter.vx[0],&m_scatter.vy[0][0],NumIndicatorsFound);
where m_scatter is like this -
Code:
PlotInfo m_scatter; //private variable
And PlotInfo is defined as -
Code:
struct PlotInfo {
std::vector<double> vx;
std::vector<double> vy[4];
std::vector<int> mIndexToEllipse;
};
The runtime error is pointing to line 1508 in <vector>. BTW my platform is Qt 5.15, Kit is MSVC2019, Qwt lib v6.2.
Any help is appreciated.
Re: Qwt setSamples() throws runtime error
Have you actually initialized curves, vx, and vy to contain anything? You haven't shown enough of your code to give any idea what you might be doing wrong.