Topic: HELP--externing enums
Author: ccurrie@s.psych.uiuc.edu (Christopher Currie)
Date: 24 Feb 95 07:43:10 GMT Raw View
Does anyone know what's so special about enums that
if I declare an enum type to be global in file A:
enum example {EX1, EX2, EX3};
and I call a function and pass, say EX2: functionInB( 4, EX2 )
and in file B I've defined that function:
void functionInB( int num, example thisCase ){ . . . }
but if I extern the enum in file B: extern example,
the complier has no idea what example is: it expects
a closing brace (")") after num,.
So, what's the trick?--I've tried everything!
Thanks for your time.
- Cheers,
Christopher