Change integer type in C++

Правка en1, от RHandarov, 2018-02-03 20:42:57

Hi Codeforces, I ask for help. Can I make a variable which is int type, but when it overflow, it con vert to long long type. For example I make an integer variable x. I give max integer value on x. When I add 1 to x, I do not want to overflow. I want to make long long and continue with next number. Is it possible? I am sorry if I ask a stupid question.

Теги c++, data types

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский RHandarov 2018-02-03 21:01:29 19 Tiny change: 't to make long long' -> 't to make ( auto convert to) long long'
en2 Английский RHandarov 2018-02-03 20:48:16 1 Tiny change: 'ow, it con vert to lo' -> 'ow, it convert to lo'
en1 Английский RHandarov 2018-02-03 20:42:57 381 Initial revision (published)