+ 1

[C/C++] size_t

Please, help me to understand what size_t does in C/C++.

9th Aug 2019, 9:03 AM
NexusBot
4 Answers
+ 3
size_t is unsigned int. It is used to define the size of an object.
9th Aug 2019, 9:09 AM
äœ çŸ„é“èŠć‰‡ïŒŒæˆ‘äčŸæ˜Ż
äœ çŸ„é“èŠć‰‡ïŒŒæˆ‘äčŸæ˜Ż - avatar
+ 2
The return type of the sizeof operator is also size_t.
9th Aug 2019, 9:22 AM
Sonic
Sonic - avatar
+ 1
CarrieForle Thanks a lot!
9th Aug 2019, 9:10 AM
NexusBot
+ 1
size_t actually mean an unsigned integer which equally defines the size of an integer variable. When you see unsigned, it means it has no sign. Only the invisible positive. When you see signed, it means has a sign. Either negative or the invisible positive.
9th Aug 2019, 10:59 AM
Franky BrainBox
Franky BrainBox - avatar