Rozmiar podstawowych typów.
Ostatnio zmodyfikowano 2012-02-13 15:47
pekfos Temat założony przez niniejszego użytkownika |
Rozmiar podstawowych typów. » 2012-02-12 18:15:50 Fragment ISO/IEC 14882:2011 : There are five standard signed integer types : “signed char”, “short int”, “int”, “long int”, and “long long int”. In this list, each type provides at least as much storage as those preceding it in the list. There may also be implementation-defined extended signed integer types. The standard and extended signed integer types are collectively called signed integer types. Plain ints have the natural size suggested by the architecture of the execution environment; the other signed integer types are provided to meet special needs. |
Czy podstawowe typy (poza int) mają stały rozmiar na każdej platformie? |
|
jsc |
» 2012-02-12 18:25:55 Radzę samemu sprawdzić, bo nikt gwarancji nie da. |
|
ison |
» 2012-02-12 21:30:06 int has the natural size suggested by the system architecture (one "word") and the four integer types char, short, int and long must each one be at least as large as the one preceding it, with char being always one byte in size. The same applies to the floating point types float, double and long double, where each one must provide at least as much precision as the preceding one.
| http://www.cplusplus.com/doc/tutorial/variables/jest raczej jasno omówione ;) |
|
pekfos Temat założony przez niniejszego użytkownika |
» 2012-02-13 15:47:56 OK, zamykam :) |
|
« 1 » |