![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 243
Rep Power: 3
![]() |
Void Pointers Question about dereferencing
I have been experimenting with void pointers. I have encountered many problems, since I want to implement them into a very big project, but I made some examples that I believe that if I understand them, I will be able to use them efficiently.
Here is my first example: cpp Syntax (Toggle Plain Text)
The result I am getting is '0xbffff9c0' from the cout function. Actually, I had predicted it, but I don't know how can I access the contents of the void pointer. Can you help? Another example: cpp Syntax (Toggle Plain Text)
cpp Syntax (Toggle Plain Text)
Can you please explain to me why this is happenning (in both examples) and what can I do to dereference a void pointer so that I can access the elements it points to?
__________________
Project::Soulstorm (personal homepage) |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Appreciate comments on some linked list code | Jessehk | C | 5 | Jul 20th, 2006 8:59 PM |
| Pointers in C (Part II) | Stack Overflow | C | 2 | Apr 29th, 2005 11:39 AM |
| Pointers in C (Part I) | Stack Overflow | C | 4 | Apr 28th, 2005 8:03 PM |
| Help! I have a problem | thomas55 | C++ | 1 | Apr 24th, 2005 2:16 PM |
| function | solomon_13000 | Java | 6 | Apr 3rd, 2005 12:42 AM |