Top "Size-t" questions

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

Why is rsize_t defined?

I found that strncpy_s() is defined under VS2013 as errno_t __cdecl strncpy_s ( _Out_writes_z_(_SizeInBytes) char * _…

c++ size-t tr24731
How to get size_t from string?

I need to get an array size from user input. It seemed natural to me to store the input as …

c string size-t
When to use size_t vs uint32_t?

When to use size_t vs uint32_t? I saw a a method in a project that receives a parameter …

objective-c c size-t uint32
C++: Is there any reason to use uint64_t instead of size_t

My understanding of size_t is that it will be large enough to hold any (integer) value which you might …

c++ vector integer size-t
Why is size_t unsigned?

Bjarne Stroustrup wrote in The C++ Programming Language: The unsigned integer types are ideal for uses that treat storage as …

c++ unsigned-integer size-t
C: Why isn't size_t a C keyword?

sizeof is a C keyword. It returns the size in a type named size_t. However, size_t is not …

c types sizeof size-t
overflows in size_t additions

I like to have my code warning free for VS.NET and GCC, and I like to have my code 64…

c integer-overflow size-t
How to detect negative number assigned to size_t?

This declaration compiles without warnings in g++ -pedantic -Wall (version 4.6.3): std::size_t foo = -42; Less visibly bogus is declaring …

c++ signed size-t
casting size_t to int to declare size of char array

I am trying to declare a size of a char array and I need to use the value of the …

c++ casting int size-t
The use of size_t in an array iterator

I have learned recently that size_t was introduced to help future-proof code against native bit count increases and increases …

c++ c arrays size-t