Why Do We Need size_t?

Usage of size_t in C++ programming.

In statically typed programming languages, datatypes play a very important role. Some of common datatypes are int, float, char, double, etc. Different datatypes have different functionalities and we use them depending on our requirements. In modern C++ code, the type “size_t” is used a lot of instead of int or unsigned int. It appears in many different scenarios like parameters to string functions, standard template library (STL), etc. Ever wondered why we need to use it in the first place? Does it have any real advantage?

Suite: Why Do We Need size_t?

Social
error

Auteur : stephane

Christian, coder, musician...

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *