Re: Example in Docs: GPOINTER_TO_INT
- From: Brooklyn Linux Solutions <ruben mrbrklyn com>
- To: "Daniel V ." <dvenkita rand lab ecel uwa edu au>
- Cc: Brooklyn Linux Solutions <ruben mrbrklyn com>, gtk-app-devel-list gnome org
- Subject: Re: Example in Docs: GPOINTER_TO_INT
- Date: Wed, 30 May 2001 23:28:42 -0400
(gint) to_print
The example puts an int in the pointer "slot" instead of a pointer, by
casting it to the pointer type. It then retrieves the number by casting
the pointer back to an int.
Maybe not the best example, but commonly used nonetheless.
I'm sorry to take this into a digression, why would we want to
cast a pointer, which has a memory address stored in it, to an integer?
Ruben
Brooklyn Linux Solutions
http://www.mrbrklyn.com
http://www.brooklynonline.com
1-718-382-5752
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]