22nd Oct 2018, 6:30 PM
Вадим Конкин
Вадим Конкин - avatar
4 Respostas
+ 8
Replace int with size_t in your user-defined function
22nd Oct 2018, 7:41 PM
blACk sh4d0w
blACk sh4d0w - avatar
+ 5
you can declare a variable dynamically. Just pay attention to don't define less memory than you need or declare so much memory that breaks your program.
22nd Oct 2018, 6:48 PM
Anya
Anya - avatar
+ 4
Because there's a limit to the size of a number an int can store. You can choose a different datatype, for example unsigned long long, then you can get higher. (There's still a limit.) You need to do that in all three places: Declaration in main, parameter and return type.
22nd Oct 2018, 6:36 PM
HonFu
HonFu - avatar
+ 1
Beside other user said, for get maximum avaible space int data type, use "long long unsigned"
22nd Oct 2018, 7:20 PM
KrOW
KrOW - avatar