I know it's bad practice to set variables like I did with xData and xdata, but the program errors out here with code -1073741819 (I believe a memory reference location error) and I have no idea why. It appears to have a problem with this->xData = xdata;, as well as the next line. xData, yData, and arraySize are all private variables of the plotter class as is prototyped in the header file below.
1 2 3 4 5 6 7 8 9 10
void setData(QVector<double> xdata, QVector<double> ydata);
I am hopelessly confused; I really appreciate any insight into this. Thank you.
I do not see any problem in the code of setData except that I do not understand the meaning of data member arraSize. Why do you can not use xData.size() directly? Also what is the type of xData.size()? I doubt that its type is int.