Re: Q: Member variable problem

From: Jase (jshelley_at_spamblock.enersol.com.au)
Date: 03/25/04


Date: Thu, 25 Mar 2004 13:50:11 +1100


"Geoff Jones" <geoff@NODAMNSPAM.com> wrote in message
news:40617cac$0$22121$cc9e4d1f@news.dial.pipex.com...
> Hi guys
>
> Err, I'm afraid that you have misunderstood me.
>
> I am using a book for Visual C++ 6. In the chapter on databases, the
author
> says that to attach controls to recordset fields, you select
m_pSet->m_Name
> from the combo box in the "Add Member Variable" box. In earlier versions
of
> VC++ you could write "m_pSet->m_Name" directly (this is why originally I
was
> having problems - I know now I have to use the pull down menu in VC++ 6).
> However, and this is another change by Microsoft, in Visual C++ 7, the
combo
> box is not there, what we now have is the "auto complete" so that when I'm
> typing in the code in the DoExchange member, as soon as I type "->" I get
a
> list off all the existing members. This include Name, so I can write
> "manually" m_pSet->Name
>
> I'm very grateful for all your help but I've just re-read my emails and I
> never indicated that "m_pSet->Name" was an entity.
>
> Sorry if I gave the wrong impression or didn't explain myself sufficiently
> well.
>
> Geoff

Sorry Geoff, but you have never refered to the variable name in an
appropriate manner that would show that you know they are two different
entities. You still haven't. You at no time select "m_pSet->m_Name" from any
list. You may select m_Name from a list provided with the context m_pSet,
but that's as close as you will get. If you are still having difficulties,
then please provide some more context. i.e. are you trying to create the
variable from the context menu in the class view, from the command button in
the class wizard, or by typing in the code directly? Try not to mention
m_pSet, as this is a pointer to a specific instance of a class. You cannot
add a member variable to an instance, only to the class declaration.

Jase