Discussion:
Set pointer in Main
(too old to reply)
Peter_APIIT
2009-07-03 08:06:17 UTC
Permalink
Hello to all, i have declare some pointer and set it to point to some
instance but when i debug it, i cannot check from debugger.

Why this happening?

[code]
int main()
{
SystemIntro staffPersonnelSystem;
staffPersonnelSystem();

login loginSession;
loginSession();

usernameType theAccountUser(loginSession);
usernameType* theAccountType = theAccountUser.FactoryMethodCreate
(loginSession);
[Break point here].

theAccountType->ForwardCreator();

MenuOption anOption(loginSession);
Human* theRealPosition = theAccountType->getInstance();
theRealPosition->CallBack(anOption() );


[/code]

Autos
loginSession
theAccountUser

Local
anOption
loginSession
theAccountUser

There are no error in return type of those calls.


Thanks for any help.
Alex Blekhman
2009-07-03 08:34:36 UTC
Permalink
Post by Peter_APIIT
Hello to all, i have declare some pointer and set it to point to
some instance but when i debug it, i cannot check from debugger.
Why this happening?
It may happen when you try to debug release build instead of debug
build. If you add a variable to Watch window, can you see it
there?

Alex
Peter_APIIT
2009-07-03 14:50:19 UTC
Permalink
Post by Alex Blekhman
Post by Peter_APIIT
Hello to all, i have declare some pointer and set it to point to
some instance but when i debug it, i cannot check from debugger.
Why this happening?
It may happen when you try to debug release build instead of debug
build. If you add a variable to Watch window, can you see it
there?
I not debug the release build but it's debug build.

I even cannot check them in auto and local window. Therefore, i cannot
add to Watch window.

I using Microsoft Visual C++ 2008 Express.

Thanks.
Alex Blekhman
2009-07-03 15:08:12 UTC
Permalink
Post by Peter_APIIT
I not debug the release build but it's debug build.
I even cannot check them in auto and local window. Therefore, i
cannot add to Watch window.
So, something went wrong with the build. Maybe source files are
out of sync with binaries or something like that. Try to delete
all intermediate build results then rebild.


Alex
Peter_APIIT
2009-07-04 02:32:12 UTC
Permalink
Post by Alex Blekhman
Post by Peter_APIIT
I not debug the release build but it's debug build.
I even cannot check them in auto and local window. Therefore, i
cannot add to Watch window.
So, something went wrong with the build. Maybe source files are
out of sync with binaries or something like that. Try to delete
all intermediate build results then rebild.
Alex
I try to clean solution and rebuild solution but same result.

Why cause this problem ?
Alex Blekhman
2009-07-04 07:57:47 UTC
Permalink
Post by Peter_APIIT
I try to clean solution and rebuild solution but same result.
Why cause this problem ?
I don't know why. VC++ debugger works for millions of other
developers around the world. If you create a new "Hello World"
project and try to debug it, does it work?

Alex

Continue reading on narkive:
Loading...