mardi 19 août 2014

For Loop Expression Result Unused but code still works what's wrong?


Vote count:

0




For Loop Expression Result Unused in xcode but code still works I don't want to show the whole loop i just need the last number it gets to what's wrong why the warning message ?



#include <stdio.h>

int main(int argc, const char * argv[])
{
// how much memory float consumes

printf("a float consumes %zu bytes\n\n", sizeof(float));

// what is the smallest number a short can hold and its largest

short x;
short y;

for (x; x > -1; x++) {
continue;
}

for (y; y < 1; y--) {
continue;
}

printf("\nSmallest short %d\nlargest short %d\n", x, y);

// same question but unsigned short instead

unsigned short i;

for (i; i < 1; i--) {
continue;
}
printf("largest unsigned short is %d\n", i);

return 0;
}


asked 16 secs ago







For Loop Expression Result Unused but code still works what's wrong?

Aucun commentaire:

Enregistrer un commentaire