Top "Size-t" questions

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

What is size_t in C?

I am getting confused with size_t in C. I know that it is returned by the sizeof operator. But …

c int size-t
unsigned int vs. size_t

I notice that modern C and C++ code seems to use size_t instead of int/unsigned int pretty much …

c++ c size-t
What's sizeof(size_t) on 32-bit vs the various 64-bit data models?

On a 64-bit system, sizeof(unsigned long) depends on the data model implemented by the system, for example, it is 4 …

c 64-bit sizeof size-t
How to cast the size_t to double or int C++

My question is that I have a size_t data, but now I want to convert it to double or …

c++ casting double size-t
should use size_t or ssize_t

At my code, I do not use int or unsigned int. I only use size_t or ssize_t for …

c++ unsigned signed size-t
When to use std::size_t?

I'm just wondering should I use std::size_t for loops and stuff instead of int? For instance: #include <…

c++ types idiomatic size-t loop-counter
Clean code to printf size_t in C++ (or: Nearest equivalent of C99's %z in C++)

I have some C++ code that prints a size_t: size_t a; printf("%lu", a); I'd like this to …

c++ printf size-t
Maximum size of size_t

I know in C return type of sizeof operator is size_t being unsigned integer type defined in <stdint.…

c gcc sizeof c99 size-t
GCC linaro compiler throws error "unknown type name size_t"

I am using GCC Linaro compiler for compiling my code. Its throwing the error unknown type name size_t from …

c gcc compiler-errors size-t linaro
size_t vs. uintptr_t

The C standard guarantees that size_t is a type that can hold any array index. This means that, logically, …

c pointers size-t