How to read a Memory address?

+3 Timmy Cafe · December 20, 2014
I have a memory address that i would like to read the value of, how can i do this?

Post a Reply

Replies

Oldest  Newest  Rating
0 Vraj Patel · December 21, 2014
Memory addresses are usually stored in hexadecimal, you may translate this into a numerical value by converting hexadecimal into decimal. If you are not sure how to do this by hand feel free to use an online resource.
0 Timmy Cafe · December 22, 2014
@Vraj Patel  Thank you for your reply, I a sorry if i was misleading about my question. What i was meaning to ask is, How can i read a memory address in VB.net using code. Also i have another question. 

I understand that each time you start a program, that variables are assigned a new memory address. But is there a way to know each time i start a program where the memory address that is holding that variable is?
0 Aakash Ahmed · December 22, 2014
Use that memory address like this:
#include<iostream>
using namespace std;

int main()
{

cout<<
}
0 Aakash Ahmed · December 22, 2014
Use that address like this:
          
#include<iostream>
using namespace std;

int main()
{
cout<<*(memory_address);
}


This will output what is in that memory address;
+1 Timmy Cafe · December 22, 2014
@Aakash Ahmed  Thank you, this has helped a lot. I also have another question,

lets say i have a user input the memory address into a variable called "foo", how can i take what address the user inputted and read it? I tried to cout the memory address of foo, but that would just give me the memory address of foo, not what the user inputted.
0 Aakash Ahmed · December 23, 2014
Assume foo has a momery address 0x232323 bla bla in it.
You  will read that memory address like this:
cout<< *(foo) ;
  • 1

Visual Basic

106,985 followers
About

One of the first products to provide a graphical environment and a paint metaphor for developing user interfaces.

Links
Moderators
Bucky Roberts Administrator