PDA

View Full Version : typecasting using macros in c



dexter.deepak
July 21st, 2008, 09:18 AM
i just came across a line regarding typecasting

This is done using macros that both test the ability to cast the given item, and perform the cast
i have never tried macros for type casting in C . can i get some help (examples), where i could better my concepts.

mike_g
July 21st, 2008, 02:10 PM
Its not something I have done myself, but I know GTK uses macros to to cast and assert widgets. maybe you could check out the source for stuff like GTK_CONTAINER(), GTK_WINDOW(), etc.

dexter.deepak
July 21st, 2008, 03:51 PM
mike, i am facing this problem while using gtk .
thats why i wanted some other explanation...thanks anyways, i will look at the source for these macros...just one more help, since i am new to gtk, i dont know where to find its source code.