All I'm trying to do is initialize my array to all 0s in C, but my compiler keeps giving me errors (and the errors aren't helpful). The array has 24 entries and the values are floating point values.
main()
{
/* Array of users arrival & departure time */
float user_queue[24];
/* Initialize queue to 0 */
int i;
for(i = 0; i < 24; i++)
{
user_queue[i] = 0.0;
}
/* Simulation time */
float time = 0;
The compiler is giving me an error on the "float time" line. The error goes away if I remove my for loop.
syntax error : missing ; before type