Hello swagat,
Friday, June 27, 2003, 10:38:47 AM, you wrote:
sk> dear friends,
sk> can anybody tell me what is the use of function "size_t" defined in the header "stddef.h".
sk> thanks in advance
sk> swagat
"size_t" is not a function, is a data type and it is a result of "sizeof" operator.
It informs how many bytes has object for which you used "sizeof".
The type is unsigned integer but you can't assume what kind of integer
it is - 16, 32, 64 bits or more ... It depends on implementation!
For example:
size_t nIntSize = sizeof(long); // nIntSize will be 4
--
Best regards,
Krzysztof
mailto:sa...@op...
http://www.saveman.w.pl
|