term does not evaluate to a function
Hi all
I get an error which says: term does not evaluate to a function
the following is my constructor
Code:
CIm
::CIm(QString filename,
QWidget * p,
const char * n, CV
*Vi, WFlags f
) : ImBase
( p, n
), m_Vi
( Vi
)
and the error occours on following twee lines:
Code:
FileA = &(Vi()->getFileA());
FileB = &(Vi()->getFileB());
if ( FileA)
{
//
}
if ( FileB )
{
//
}
can someone help me?
thanks in advance
Re: term does not evaluate to a function
how are FileA and FileB declared ??
it seems u are using some function name without the brackets() ....
Re: term does not evaluate to a function
"Vi" is not a function (it's a variable) and you call it as such.
Re: term does not evaluate to a function
Quote:
Originally Posted by
aamer4yu
how are FileA and FileB declared ??
it seems u are using some function name without the brackets() ....
Code:
CFileA * FileA;
CFileB * FileB;
and if i remove this these two line i do not get a compiler error..
Code:
FileA = &(Vi()->getFileA());
FileB = &(Vi()->getFileB());
@wysota
Vi is a function ans is made as such
Code:
CVi *Vi() { return m_Vi; }
Re: term does not evaluate to a function
No, it's not. You have a parameter "CV *Vi" in the constructor that shadows the function. Change the argument name.
Re: term does not evaluate to a function
@Wyosta
I cant change that argument because CV is a class and i assign a pointer
to CV class and thats why it is "CV* Vi"
Re: term does not evaluate to a function
Quote:
Originally Posted by
wysota
No, it's not. You have a parameter "CV *Vi" in the constructor that shadows the function. Change the argument name.
my mistake i got it u were right i change the name and it works