Thread: how to watch variable address with variable value in code block

  1. #1
    Registered User
    Join Date
    Feb 2022
    Posts
    72

    how to watch variable address with variable value in code block

    I have successfully installed code block on my window computer. I also compiled and debugged the code. I can watch variable value but I don't understand how to watch variable address with variable value.

    How do you watch variable address with variable value ?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,126
    Having setup a watch point on a pointer variable, use the context menu to then say "dereference".
    how to watch variable address with variable value in code block-screenshot-2022-04-30-05-49-27-png
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Feb 2022
    Posts
    72
    can we see the address of the variable in the debug window without declaring the pointer?

    If you don't declare pointer pcount then how would you see address of variable count

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,126
    You can right-click on the watched variable, choose properties and change the watch expression to whatever you want.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. scanning variable without address of variable
    By vead in forum C Programming
    Replies: 4
    Last Post: 02-04-2018, 06:25 AM
  2. Replies: 2
    Last Post: 12-20-2017, 08:12 AM
  3. How to watch stack variable for corruption?
    By User Name: in forum C++ Programming
    Replies: 10
    Last Post: 06-06-2012, 03:56 AM
  4. watch variable??
    By haochao in forum C++ Programming
    Replies: 8
    Last Post: 10-12-2008, 12:34 PM
  5. hardbinding a memory address to a variable in code
    By quickNitin in forum C Programming
    Replies: 3
    Last Post: 07-24-2006, 01:09 AM

Tags for this Thread