Re: How can i find when a variable is out of scope?

From: Karl Heinz Buchegger (kbuchegg_at_gascad.at)
Date: 03/14/05


Date: Mon, 14 Mar 2005 09:52:50 +0100


"groleo@gmail.com" wrote:
>
> Hi.
> I have some problems with variables :D
>
> I have the classes given below:
>
> The problem is when I try to acces Commands().sock->m_sock, from
> inside Message();
> When I'm using m_sock inside Commands(), it has one value.
> When I'm using m_sock inside Message() it has another value.
> The thing is that i'm not modifying the m_sock value;

Please show the exact code that implements this.
If possible, create a short, complete test program which shows just
that error in action.

-- 
Karl Heinz Buchegger
kbuchegg@gascad.at


Relevant Pages

  • Re: functions
    ... Karl Heinz Buchegger wrote: ... > moderate complexity. ... I really like how you show the newbee to write a test program ... C++ Faq: http://www.parashift.com/c++-faq-lite ...
    (comp.lang.cpp)
  • Re: correctly cleaning up and exiting the app.
    ... Karl Heinz Buchegger wrote: ... If the dtor of Menu deletes all commands ... Claboom ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Re-using Plots
    ... %without the xlim setting being in effect. ... %How can I get them without repeating the commands? ...
    (comp.soft-sys.matlab)