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.
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.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:
Qt Code:
bool getData( QList<float> & A, QList<float> & B ) // or bool getData( QList<float> * A, QList<float> * B )To copy to clipboard, switch view to plain text mode
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Bookmarks