Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5993087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:37:30+00:00 2026-05-22T23:37:30+00:00

I wrote a c++ program, and when I’m using debug mode, I put a

  • 0

I wrote a c++ program, and when I’m using debug mode,
I put a pointer type variable (say m_pdummy) into the watch list, but it shows “bad ptr”;

If I expand this pointer(by clicking the “+” left to the name) and wants to see other variables under this pointer, all variables show “expression cannot be evaluated“;

However, in my code, I wrote some output stuff, like:
CString str;
DWORD d1;
d1 = m_pdummy->m_wgear;
str.Format("%d");
MessageBox(str);
and then message box shows correct value;

But if I drag m_pdummy, d1, str into watch list, all of them says either “expression cannot be evaluated” or “symbol not found“; But this is impossible because message box could show values;

So what’s the problem here?!

Best regards to whom read this,
Thanks!

Marson

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:37:31+00:00Added an answer on May 22, 2026 at 11:37 pm

    Maybe the code you are debugging with is not exactly the one running, or the VS Compiler optimize your code so some of the code doesn’t exist anymore.
    In the case of the former, the breakpoint and debug value cannot be watched, you should check out the code match the debugging one. I come up with this when I register COM server a ‘wrong’ dll.
    In the case of the latter, you should close the optimization option. Hope this will help you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a program using AutoIT to fetch information from a number of websites
I wrote a program to click on an application automatically at scheduled time using
I wrote a program in C++/OpenGL (using Dev-C++ compiler) for my calculus 2 class.
I wrote a program for linux using libxml2 for html parsing. Although it does
I wrote a program that runs fine, however packaging the file into a jar
I wrote a program in C++ under Linux. For thread I am using pthread.
A coworker recently wrote a program in which he used a Python list as
I wrote a program using sqlite but when I run it there seems no
I wrote a program in C having dangling pointer. #include<stdio.h> int *func(void) { int
I wrote a program that is using the Perl POE Framework to realize a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.