Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This way you always know what the size is, because a specific type is dedicated to sizes. The very own question shows that it can be an issue: is it an <code>int</code> or an <code>unsigned int</code>? Also, what is the magnitude (<code>short</code>, <code>int</code>, <code>long</code>, etc.)?</p> <p>Because there is a specific type assigned, you don't have to worry about the length or the signed-ness.</p> <p>The actual definition can be found in the <a href="http://www.cplusplus.com/reference/clibrary/cstring/size_t/" rel="nofollow noreferrer">C++ Reference Library</a>, which says:</p> <blockquote> <p>Type: <code>size_t</code> (Unsigned integral type)</p> <p>Header: <code>&lt;cstring&gt;</code></p> <p><code>size_t</code> corresponds to the integral data type returned by the language operator <code>sizeof</code> and is defined in the <code>&lt;cstring&gt;</code> header file (among others) as an unsigned integral type.</p> <p>In <code>&lt;cstring&gt;</code>, it is used as the type of the parameter <code>num</code> in the functions <code>memchr</code>, <code>memcmp</code>, <code>memcpy</code>, <code>memmove</code>, <code>memset</code>, <code>strncat</code>, <code>strncmp</code>, <code>strncpy</code> and <code>strxfrm</code>, which in all cases it is used to specify the maximum number of bytes or characters the function has to affect.</p> <p>It is also used as the return type for <code>strcspn</code>, <code>strlen</code>, <code>strspn</code> and <code>strxfrm</code> to return sizes and lengths.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload