Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Can I store a type as a variable in C?

Name: Anonymous 2008-06-08 7:24

printf("Hello World, /prog/\n");

I was wondering if there is a good way to store a C data type as a variable, and later use that variable for the declaration of return types and variable types (in the form of a cast would be fine), or as function argument for polymorphic fun.

Name: Anonymous 2008-06-08 8:06

>>1
__typeof__

Name: Anonymous 2008-06-08 8:31

>>7
__typeof__ is an extension supported by some compilers.
It's not really standard C. What you're asking for cannot be done that way. You have to find another solution if you want your code to be portable.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List