why can’t I see the variable ‘x’ in memory window of VS2005 while stepping the code using debugger?
int main()
{
char *c = "String"; //visible
char x = 'a'; // not visible
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Both are visible in the memory window. For example in the memory window in the address field type
&xand then you will see the character code of the char in hex.For example if you have:
Then in the memory window you type
&xyou will see the number 0x78 which is in base10 the number 120.Characters are just numbers.
By the way maybe you’re looking for the watch window (where you can type in any value or expression and have it evaluated for you) or locals window (which shows you all of the variables that are visible to the current scope).