Use of typeof
Philip Cheng
cheng@PCIgeomatics.com
Fri Mar 1 08:03:00 GMT 2002
I would like to use typeof to determine the type of a variable.
However, I keep getting the error when I try to compile the program.
test.c: In function `main':
test.c:8: parse error before "typeof"
Anyone knows how can I solve the problem? Thanks in advance for your help.
Philip
Here is my test program:
#include <stdio.h>
main()
{
double dftest;
dftest = 1.0;
if (__builtin_types_compatible_p (typeof (dftest), double))
printf("It is double\n");
}
More information about the Gcc-help
mailing list