typedef
enum
{
A,B,C,
}DATA_SOURCE_ENUM;
int
main(
int
argc ,
char
* argv[])
{
DATA_SOURCE_ENUM source;
printf
(
"enter data source\n"
);
scanf
(
"%d"
,&source);
printf
(
"source=%d\n"
,source);
return
0;
}
warning: format '%d' expects argument of type 'int *', but argument 1 has type 'enum DATA_SOURCE_ENUM *'
change to:
scanf
(
"%d"
,(int*)&source);
(int *)