Possible Lossy conversion from long to int

后端 未结 6 701
借酒劲吻你
借酒劲吻你 2021-01-01 02:15

I wish to enter one int and another long ex: 1 and 1000000000, and now I wish to create an array of size 1000000000. And then at each index of arra

6条回答
  •  渐次进展
    2021-01-01 03:03

    In static array we cannot use long datatype values for assigning index position. 1.Either convert long to int in for/while/do while loop. 2. Typecast arr[(int)i] to remove error

提交回复
热议问题