I am trying to figure out my way through c89 and now I ma stuck with this problem.
Does stdint.h
have any equivalent for double data type?
If yes how do we print it?
Asked
Active
Viewed 2,627 times
3

Aman Deep Gautam
- 8,091
- 21
- 74
- 130
-
Are you asking for where to find `FLT_MAX` and friends? You can turn to `float.h` – chrisaycock Jun 17 '12 at 00:50
1 Answers
4
stdint.h
is for integer types and there is no fixed-size floating types in C.
By the way you are mentioning C89, note that stdint.h
standard header is a C99 addition.

ouah
- 142,963
- 15
- 272
- 331
-
I had a function which use bool and when I compiled it it gave the error that bool is not supported. So I assumed that gcc is compiling by default with c89 standard. I do not know but I am able to compile the `stdint.h` header with the same compiler which does not compiles `bool` keyword. – Aman Deep Gautam Jun 17 '12 at 01:00
-
`gcc` compiles in C89 with GNU extensions by default. To use `bool`, include `stdbool.h` and compile with `-std=c99` or `-std=gnu99` (C99 with GNU extensions). – ouah Jun 17 '12 at 01:01
-
`bool` is a C99 construct. What version of gcc are you using? Note that you can specify the standard compliance via `-std=c99` just to be sure. – dirkgently Jun 17 '12 at 01:01
-
@ouah you missed my point. I was saying that if `stdint.h` would have been a c99 construct that why is not gcc compiling bool. I mean to point at the contradiction between these two facts. – Aman Deep Gautam Jun 17 '12 at 01:05
-
1it IS a c99 addition. `gcc` is just kind enough to let you include the header in c89 without complaining. – ouah Jun 17 '12 at 01:09
-
may be an so I assumed I am working on c89. I would like to ask that will it include the functionality of that header or it is just not complaining. I mean my code largely depends on keywords like `unit8_t`. – Aman Deep Gautam Jun 17 '12 at 01:12