I'm learning C. I wonder whether there is an instruction or command to recognize the type of the variable.
To be more practical: I have a program which works with integers, I want to show an error message if the user inserts a real number when running the program.
Hope you can help!
答案 0 :(得分:2)
This is not part of the C standard, but GCC has the typeof keyword.
You have to be using the GCC compiler for it though.