JZ
Size: a a a
JZ
D
JZ
a
JZ
СП
NM
#include <iostream>
int main(int argc, const char * argv[]) {
unsigned apples {15};
short signed oranges {13};
std::cout << oranges - apples << std::endl;
return 0;
}
///output: 4294967294
a
VS
#include <iostream>
int main(int argc, const char * argv[]) {
unsigned apples {15};
short signed oranges {13};
std::cout << oranges - apples << std::endl;
return 0;
}
///output: 4294967294
NM
VS
VS
VS
std::size
, то с 20 стандарта есть std::ssize
, но если он недоступен, то примитивную версию можно и руками написать через static_cast
и size
NM
VS
NM
NM
SS
SS
NM