Home > Back-end >  Why c hou an error in the use of a generic type, the compiler red Typename displays "should be
Why c hou an error in the use of a generic type, the compiler red Typename displays "should be

Time:09-26

#include
#include
#include
#include
# define TypeName _Generic (x) (x), int: "int", \
Float: "float")

# define the MUL (X) (X) * (X)
Int main (void)
{
int m;
M=the MUL (5);
Printf (" % s \ n ", TypeName (m));

}


1> -- -- -- -- -- - has started to generate: project: Project2, configuration: Debug Win32 -- -- -- -- -- --
1> Pleasant. C
1> C: \ Users \ yehaoyu \ source \ repos \ Project2 \ Project2 \ pleasant C (13) 3: the error C2059: grammar errors: "type"
1> Generating project has been completed "Project2. Vcxproj" operations - failure,
==========: zero success, failure, latest 0, 0 skip==========
 

CodePudding user response:

Vs c98 support is not good, let alone c11

CodePudding user response:

That what to do, any solution

CodePudding user response:

C - free
  • Related