Sujet : Re: "A diagram of C23 basic types"
De : jameskuyper (at) *nospam* alumni.caltech.edu (James Kuyper)
Groupes : comp.lang.cDate : 07. Apr 2025, 19:35:52
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vt15u8$df0l$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : Mozilla Thunderbird
On 4/3/25 18:00, Waldek Hebisch wrote:
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
...
Not always practical. A good example is the type size_t. If a
function takes an argument of type size_t, then the symbol size_t
should be defined, no matter which header the function is being
declared in.
Why? One can use a type without a name for such type.
How would you declare a pointer to a function type such that it is
compatible with such a function's type?
When a variable is needed to store a value that would be passed as the
size_t argument to such a function, I would (in the absence of any
specific reason to do otherwise) want to declare that object to have the
type size_t.
Why should I have to #include a different header just because I want to
do these things?