I have a sentence to be read, that sentece will give me the values of X2 and Y2,
The function is called readNext(arg), but it crashes when i call it, can't find out why. (no error message on windows).
Code:
int x1,x2,y1,y2;
x1 = x2 = y1 = y2 = 0;
readNext(x2);
readNext(y2);
///End of code///
//This function receives them:
void readNext(int *arg1) {
*arg1 = -1;
printf("ok");
while(*arg1 < 0 || isdigit(c)) {
if(isdigit(c))
*arg1 = (*arg1 < 0) ? (int)(c-'0') : *arg1 * 10 + (int)(c-'0');
printf("3o3 arg1 = %i\n",*arg1);
if(c==';') break;
c = getchar();
}
}
But in Windows it just crashes, and i can't test it on linux yet.
Can you find out where's the error?
Thanks!