Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <complex.h>
- #include <stdint.h>
- #include <stdio.h>
- int main()
- {
- float complex x = I + I / 3 * I / 2;
- short int complex y = I + I / 3 * I / 2;
- int16_t complex z = I + I / 3 * I / 2; /* Why ? */
- printf("x=(%+f,%+f)n", creal(x), cimag(x));
- printf("y=(%+f,%+f)n", creal(y), cimag(y));
- printf("z=(%+f,%+f)n", creal(z), cimag(z)); /* Why ? */
- return 0;
- }
- In file included from ./complex.c:1:0:
- ./complex.c: In function ‘main’:
- ./complex.c:9:13: error: two or more data types in declaration specifiers
- int16_t complex z = I + I / 3 * I / 2; /* Why ? */
- gcc-5 --std=c99 ./complex.c -o ./complex
- gcc-4.9 --std=c99 ./complex.c -o ./complex
Add Comment
Please, Sign In to add comment