V
vivek
What will happen if i replace a typedef with a #define?
vivek said:What will happen if i replace a typedef with a #define?
vivek said:What will happen if i replace a typedef with a #define?
What will happen if i replace a typedef with a #define?
John said:DO NOT SPEAK THAT NAME, lest he notice and come back to pester us
again, with the Three Stooges (Twink, McCormack, and Just Richard)
egging him on.
What will happen if i replace a typedef with a #define?
Nothing of consequence.
Eminent computer scientist S**** N**** demonstrated, years ago, that
they are the same thing.
Some typedefs would be difficult to replace with a macro. For
example, take
typedef int *(*(*foo)[20])(char c);
foo is a synonym for "pointer to 20-element array of pointers to
functions taking a char parameter and returning a pointer to int."
Some typedefs would be difficult to replace with a macro. For
example, taketypedef int *(*(*foo)[20])(char c);
foo is a synonym for "pointer to 20-element array of pointers to
functions taking a char parameter and returning a pointer to int."
Are you saying that:
typedef int *(*(*foo)[20])(char c);
Creates a complex type with an alias of foo; while:
int *(*(*bar)[20])(char c);
Creates a variable bar with that same type?
Yes.
(Not sure what the 'c' is doing in there).
Documentation.
How would I specify that same complex type without either the foo or bar
tag, as in a cast for example? Is it just:
(int *(*(*)[20])(char c))
Micah said:Ah, so _those_ are what flew out my nose when I forgot to ensure
isalpha()'s argument was representable as an unsigned char.
Morris Dovey said:Heh - might as well invoke all the demons...
Ah, so _those_ are what flew out my nose when I forgot to ensure
isalpha()'s argument was representable as an unsigned char.
vivek said:What will happen if i replace a typedef with a #define?
vivek said:What will happen if i replace a typedef with a #define?
Morris Dovey said:Heh - might as well invoke all the demons...
What ever happened to that lad who preached that hexadecimal was
the one true number system?
It's (int *(*(*)[20])(char)) because you can create a cast from aBartc said:Are you saying that:
typedef int *(*(*foo)[20])(char c);
Creates a complex type with an alias of foo; while:
int *(*(*bar)[20])(char c);
Creates a variable bar with that same type? (Not sure what the 'c' is doing
in there).
How would I specify that same complex type without either the foo or bar
tag, as in a cast for example? Is it just:
(int *(*(*)[20])(char c))
?
Richard said:I don't know, but have you SEEN the CHAIR recently?
Richard said:I don't know, but have you SEEN the CHAIR recently?
Morris Dovey said:I'm obviously missing something (either I've been away too long
or didn't get enough sleep last night) - what have I missed?
(e-mail is ok if you prefer).
I'm obviously missing something (either I've been away too long
or didn't get enough sleep last night) - what have I missed?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.