Good day!
I created a class which, at the moment, i have one method beside the constructor/destructor:
//signature
"QVector<int> insertNeatly(int num, QVector<int> raffle, int idRfl)"
//signature
"QVector<int> insertNeatly(int num, QVector<int> raffle, int idRfl)"
To copy to clipboard, switch view to plain text mode
In the constructor i'm trying to call this method but i'm having the following error message, but first, the part of my code:
//...code in the constructor
//...
QVector< int > raffle(idRfl, 0);
for(int i = 0; i < idRfl; i++)
{
//Error here-> raffle = insertNeatly(line.at( i ).toInt( ), raffle, idRfl);//"line" is a stringlist.
}
//...
//...code in the constructor
//...
QVector< int > raffle(idRfl, 0);
for(int i = 0; i < idRfl; i++)
{
//Error here-> raffle = insertNeatly(line.at( i ).toInt( ), raffle, idRfl);//"line" is a stringlist.
}
//...
To copy to clipboard, switch view to plain text mode
Error message:
D:\Programming\C-C++\Qt\Windows\historic.cpp:26: error: undefined reference to `Historic::insertNeatly(int, QVector<int>, int)'
I don't know if i'm right but i believe, since this code are in constructor, i cannot call other method of this class in it. Is that right?
If i'm right, what do you think i create another class just to put this method so i can call him in my constructor? Do you have any other idea?
Thanks!
Bookmarks