Kezdőoldal » Számítástechnika » Programozás » A C++ szabványban (draft) hol...

A C++ szabványban (draft) hol van benne a short, int, long méret alapján vett rangsor szabály? Egyszerűen nem találom

Figyelt kérdés

A sizeof(char) == sizeof(signed char) == sizeof(unsigned char) == 1 szabályt megtaláltam, de a short/long -ot egyszerűen nem. Rá is kerestem, de ígyse.


Vki nem tudja véletlenül? Nyilván nem oldalszámot várok hanem pl h meik fejezetben, stb..


2013. máj. 20. 13:49
 1/4 A kérdező kommentje:

Már megtaláltam.


ANSI C++03 3.9.1 2-3; azért köszönöm

2013. máj. 20. 14:23
 2/4 anonim ***** válasza:
Van ilyen szabály? Nem lehet mind egyenlő méretű?
2013. máj. 20. 14:23
Hasznos számodra ez a válasz?
 3/4 anonim ***** válasza:
72%
Előzőnek: De, lehet egyenlő, csak kisebb nem, mint az előző. Ez van benne a szabványban.
2013. máj. 20. 14:52
Hasznos számodra ez a válasz?
 4/4 A kérdező kommentje:

ANSI C++ standard:


(2) There are four signed integer types: “signed char”, “short int”, “int”, and “long int.” In this list, each type provides at least as much storage as those preceding it in the list. 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.


(3) For each of the signed integer types, there exists a corresponding (but different) unsigned integer type: “unsigned char”, “unsigned short int”, “unsigned int”, and “unsigned long int,” each of which occupies the same amount of storage and has the same alignment requirements (3.9) as the corresponding signed integer type) ; that is, each signed integer type has the same object representationas its corresponding unsigned integer type. The range of nonnegative values of a signed integer type is a subrange of the corresponding unsigned integer type, and the value representation of each corresponding signed/unsigned type shall be the same.

2013. máj. 20. 16:43

Kapcsolódó kérdések:





Minden jog fenntartva © 2024, www.gyakorikerdesek.hu
GYIK | Szabályzat | Jogi nyilatkozat | Adatvédelem | Cookie beállítások | WebMinute Kft. | Facebook | Kapcsolat: info(kukac)gyakorikerdesek.hu

A weboldalon megjelenő anyagok nem minősülnek szerkesztői tartalomnak, előzetes ellenőrzésen nem esnek át, az üzemeltető véleményét nem tükrözik.
Ha kifogással szeretne élni valamely tartalommal kapcsolatban, kérjük jelezze e-mailes elérhetőségünkön!