What's the difference between string and string data types?

For example int and INT. About this two I just know that int is a fundamental type and INT is a Windows data type that gets 4 bytes in memory and INT is used with the window API.

But I don't understand what is basic and correct for both of them.

Help me understand this completely?

+3


source to share


1 answer


int

- the key word of the language, int

- no.

The size and range of values ​​it can take int

are limited, but not fixed, by the C ++ standard.

int

is a Windows-defined data type that is a 4-byte 2's complement signed integral type.



With the MSVC compiler targeting Windows, maybe it is typedef

or #define

d before int

, as int

it has the required specs in that case.

Usage std::int32_t

would have been preferable as it was multiplatform, although the compiler shouldn't support it.

+5


source







All Articles