robgeek
12th May 2015, 00:41
Good evening!
What is wrong with the code bellow? "Number" is a class which has an constructor Number(int i, int j).
QList< QVector< Number > > Lottery::patternList(QList< QVector< Number > > pl, int array[], int size)
{
QVector<Number> first;
if( pl.size( ) )
{
//Not implemented.
}
else
{
for(int i = 0; i < size; i++)
if(array[i] != 0)
first.push_back( Number((i + 2), array[i]) );
pl.push_back( first );
}
}
Error message:
C:\Qt\5.4\mingw491_32\include\QtCore\qvector.h:281 : error: no matching function for call to 'Number::Number()'
new (from++) T();
^
Thanks!
What is wrong with the code bellow? "Number" is a class which has an constructor Number(int i, int j).
QList< QVector< Number > > Lottery::patternList(QList< QVector< Number > > pl, int array[], int size)
{
QVector<Number> first;
if( pl.size( ) )
{
//Not implemented.
}
else
{
for(int i = 0; i < size; i++)
if(array[i] != 0)
first.push_back( Number((i + 2), array[i]) );
pl.push_back( first );
}
}
Error message:
C:\Qt\5.4\mingw491_32\include\QtCore\qvector.h:281 : error: no matching function for call to 'Number::Number()'
new (from++) T();
^
Thanks!