Top "Size-t" questions

In C/C++ size_t is the unsigned integer type of the result of the sizeof operator

size_t to unsigned int (from API function)

I am using the Oracle API to access a database and this API has a function readBuffer(char * buffer, unsigned …

c++ size-t
Which C++ standard header defines SIZE_MAX?

I'm working on an existing C++ codebase that happens to use SIZE_MAX in a couple of places. I did …

c++ header size-t stdint
Converting a size_t into an integer (c++)

I've been trying to make a for loop that will iterate based off of the length of a network packet. …

c++ integer size-t
C size_t and ssize_t negative value

size_t is declared as unsigned int so it can't represent negative value.So there is ssize_t which is …

c size-t
Convert size_t to string

I'm trying to write a TCP server which a client can use to browse the server's directories. In addition to …

c linux posix stat size-t
Is it safe to use negative integers with size_t?

I just saw some C++ code like this. It was using a condition to decide whether to walk forward or …

c++ c++11 unsigned size-t
Should I include stddef.h or cstddef for size_t

When I want to use size_t in C++, should I include <stddef.h> or <cstddef>? …

c++ namespaces naming-conventions header-files size-t
What is the limit on malloc parameter of type size_t in C? Docs say it has an upper limit of UINT_MAX but I can't go beyond INT_MAX

I want to allocate a 2.9GB char array with database = (char*) malloc((2900 * 1000000 * sizeof(char))); This gives an integer overflow warning …

c malloc limit size-t
typedef for a signed type that can contain a size_t?

Is there a standard (or MSVC proprietary) typedef for a signed type that can contain the full range of size_…

c++ c size-t
Why is the maximum size of an array "too large"?

I'm under the same impression as this answer, that size_t is always guaranteed by the standard to be large …

c gcc mingw size-t stdint