0

I have a boolean free defined as

bool inbetween, free, lunch;

The only other times I use the boolean are here

//get time info
memset(period, 0, sizeof(period));
free = false;
inbetween = false;
lunch = false;

(I declare it true in a couple of if statements) And here:

if(free){
  for(int i=0;i<=3;i++){
    period[i] = FREE[i];      
  }
}
if(lunch){
  for(int i=0;i<=4;i++){
    period[i] = Lunch[i];      
  }
}
if(inbetween){
  for(int i=0;i<=8;i++){
    period[i] = Inbetween[i];      
  }
}

I use all 3 booleans the same amount of times, yet I'm only getting this error with free

1 Answers1

3

free is a library function that is used to free memory. I recommend that you not use free as a variable name.

user3386109
  • 34,287
  • 7
  • 49
  • 68