error C3867 C2298: C2298:

Migration error, the below code snippet is working fine in VC6 and VC 2008 giving the error/

bool TqeMIBDOV::IsFirstNameNull() const
{
      return IsFirstNameNull;
      
}

'error C3867': function call missing argument list; use '&TqeMIBDOV::IsFirstNameNull' to create a pointer to member
error C2298: 'return' : illegal operation on pointer to member function expression
bobbeyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pgnatyukCommented:
Are you sure?
'IsFirstNameNull' - do you use the same name for an instance variable and for a method in in the same class?
Maybe the variable name could be m_bIsFirstNameNull?
ZoppoCommented:
Hi  bobbey,

I found no way to get this compiled with VC 6.0 without an error. Could you show us how the 'IsFirstNameNull' (the second one, not the function you already posted) is declared?

ZOPPO
bobbeyAuthor Commented:
the complete pice of code is
void TqeMIBDOV::IsFirstNameNull(bool a_IsFirstNameNull)
{
      m_IsFirstNameNull = a_IsFirstNameNull;
}

bool TqeMIBDOV::IsFirstNameNull() const
{
      return IsFirstNameNull;
      
}
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

pgnatyukCommented:
So the second function looks so:
bool TqeMIBDOV::IsFirstNameNull() const
{
      return m_IsFirstNameNull;
}

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bobbeyAuthor Commented:
pgnatyuk:
You are right, its a bug in VC++6 code also. It supposed to return m_IsFirstNameNull;
I must find this. Thanks  for your help.
itsmeandnobodyelseCommented:
If that has ever compiled with VC6 it probably was  

BOOL TqeMIBDOV::IsFirstNameNull() const
{

     // that returns a function pointer to TqeMIBDOV::IsFirstNameNull
      return m_IsFirstNameNull;  
}

(or they did make a cast)

In any case the function never would have returned FALSE (== 0).
bobbeyAuthor Commented:
Its  a huge code base, I am new to this project. so not sure about that.
I think you are right, it nver would have returned FALSE.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual C++.NET

From novice to tech pro — start learning today.