Hello ,
How to resolve below compilation error.activity_type is a member of structure and the output from databse will be stored in structure.Expected output wil l be either D or N or C .
sample struct format:
struct a{
char acAtivity_type[2];
}
code:
switch (a->activity_type) {
case 'D':
strcpy\(xactivity, "Deleted"\);
break;
case 'N':
strcpy\(xactivity, "New_Device"\);
break;
case 'C':
strcpy\(xactivity, "Change"\);
break;
default:
strcpy\(xactivity, "UNKNOWN "\);
break;
\}
Error:
rpt13.c: In function `do_rpt':
rpt13.c:344: switch quantity not an integer
*** Error code 1
make: Fatal error: Command failed for target `rpt13.o'