Quantcast
Viewing latest article 3
Browse Latest Browse All 3

Error when compiling, error in array

float premios[20]={500.00, 700.00, 800.00, 900.00, 1200.00, 1500.00, 1800.00, 2000.00, 2100.00, 2300.00, 2800.00, 3000.00, 3200.00, 3500.00, 4000.00, 10,000.00, 100,000.00, 200,000.00, 500,000.00, 1,000,000.00 };

Look at the code, when i try to compile it, it gives me the error "[Error] too many initializers for 'float [20]' ", it has exactly 20 values, tried to correct it by setting it to 21 values but it didnt work. Then i set the array to an empty array and it worked, can anybody explain me why did it happen?


Viewing latest article 3
Browse Latest Browse All 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>