int getPositionsH(int r, int ans, int size){
int x=0;
int y=0;
if (ans==9){
x =0;
} else
x=(rand()%size);
y=(rand()%10);
return x;
return y;
}
Basically this is a function in c that is supposed to return 2 randomly generated positions x and y. However while debugging I noticed that x and y are still empty after this is executed. No idea why because I wrote return and everything. Any ideas why? Any help is appreciated.