size_t

I want to know about size_t. What is it?? a daatype or anything else?? Please post if anyone has an idea regarding the same. I am new to this forum and am interested in interraction on C++.

Thanks in advance
It's an alias for int or long, I'm not sure. Created using typedef.
size_t is used by standard library to represent a size, for exemple a size to allocate or an offset in a file. I think it is an alias of unsigned int but i's probably compiler dependanrt.
> size_t is used by standard library to represent a size,

An alias for some unsigned basic integral type that is large enough to represent the size (number of bytes occupied in memory) of any object. Usually either an unsigned int or an unsigned long; though an unsigned long long is allowed.

> for exemple a size to allocate or an offset in a file

That is a std::streamoff - an alias for some signed basic integral type that is large enough to represent the maximum possible size of a file.
So, what exactly is size_t, an alias for unsigned int or unsigned long or unsigned long long..??
Or is it compiler dependent..??
Apparently compiler (standard library implementation) dependant. Why does it matter though?
it is an alias for unsigned created using typedef facility...if u want to see it then goto "stdio.h" file and open and see it ur self
Thank u all..
Topic archived. No new replies allowed.