Quantcast
Channel: Active questions tagged header - Stack Overflow
Viewing all articles
Browse latest Browse all 700

How and where to include stdint.h type definitions in a header file?

$
0
0

If I want all of my *.c files that have proto.h included to use int32_t instead of int is it correct to write this into a header file called proto.h:

#ifndef PROTO_H_INCLUDED#define PROTO_H_INCLUDED#ifndef STDINT_H_INCLUDED#define STDINT_H_INCLUDEDtypedef int int32_t;typedef unsigned int uint32_t;typedef size_t uint32_t;#endif

and then include proto.h into all the *.c files that need this typedef?

Or should I include stdint.h into all of my *.c files?


Viewing all articles
Browse latest Browse all 700

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>