LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   GTK code uses pointer for structs and not normal instances why? (https://www.linuxquestions.org/questions/linux-desktop-74/gtk-code-uses-pointer-for-structs-and-not-normal-instances-why-494794/)

anksphenomenon 10-23-2006 04:45 AM

GTK code uses pointer for structs and not normal instances why?
 
Hi

I was goinf through the GTK code and saw that GTK code uses pointer for structs and not normal instances of the same structs...

why could this be so?
My take is that they wanted to use just one variable name and they can easily initialise the pointer to that struct type .

whereas if they used just an instance of the struct, they wd have to create a new instance evry time they needed a new variable ...


am i on the right direction?


All times are GMT -5. The time now is 02:04 AM.