The last line in the following line keeps on generating the ” warning C4552: ‘<=’ : operator has no effect; expected operator with side-effect” error, but I don’t see any fault in it…
void countDays(void) {
int i=0;
if (birth_month == 2 && birth_day <= 28) {
for ( i <= what_birthday ){
You’re using the wrong syntax for the for loop in the code you posted, did you mean something like this?
If you didn’t care about incrementing i after every iteration, you could use a while loop instead.
The code shouldn’t have compiled at all without the semicolons. You get that warning for things like:
Because while it is valid code, it’s probably not what you intended.