0

C++. There is a compilation error when building. Can anyone tell me what is going on?

https://sololearn.com/compiler-playground/c7BBMeQMz5T8/?ref=app

1st May 2025, 8:30 PM
Евгений Самошин
Евгений Самошин - avatar
1 Antwort
+ 4
It's a warning saying that you're using 2 different types with each other. int can be positive or negative (signed) and is usually 4 bytes sizeof operator cannot be negative (long unsigned int) and long can be 4-8 bytes the code will work, but you may encounter over or underflow, which is why it's a warning
1st May 2025, 11:21 PM
「HAPPY TO HELP」
「HAPPY TO HELP」 - avatar