I want to output two results in a function,so I define it as follows:
bool getData(out QList<float> A,out QList<float> B)
{
}
but error occur:
error C2061: syntax error : identifier'out'.
How to define 'out' para in a funtion?
thank you.
Printable View
I want to output two results in a function,so I define it as follows:
bool getData(out QList<float> A,out QList<float> B)
{
}
but error occur:
error C2061: syntax error : identifier'out'.
How to define 'out' para in a funtion?
thank you.
Open your book, find out why this is not valid C++ syntax.Quote:
bool getData(out QList<float> A,out QList<float> B)
Usually, if you want to pass in a variable that you will assign inside a function, you use either a reference or a pointer:
Code:
bool getData( QList<float> & A, QList<float> & B ) // or bool getData( QList<float> * A, QList<float> * B )