Hi,
In Qt3 I used QArray like this:
QArray<float> *t;
...
t = new QArray<float>(day_no+1);
...
t->at(j) = j+1;
QArray<float> *t;
...
t = new QArray<float>(day_no+1);
...
t->at(j) = j+1;
To copy to clipboard, switch view to plain text mode
and that worked. But in Qt4 you cannot do that. So I changed it:
QVector<float> t;
...
t[j] = j+1;
QVector<float> t;
...
t[j] = j+1;
To copy to clipboard, switch view to plain text mode
and that compiles OK but I want to do it like I did in Qt3 and allocate t as new:
t = new QVector<float>(day_no+1);
t = new QVector<float>(day_no+1);
To copy to clipboard, switch view to plain text mode
But how do I do the assignment then like line 3 in the middle chunk of the above?
Thanks!
Bookmarks