scanf() is getting stuck on final use
<p>I'm trying to use scanf to assign values to some integers but whichever scanner I put last will get suck as if it it wasn't seeing the new line. I've tried flushing the input buffer before every scan, but its hasn't helped. Do i need to malloc the pointers, even if they are being passed as the address of an existing variable out of function?</p>

<p>code:</p>

<pre><code>void settings(int *x, int *y, int *l, int *m){
printf("Please enter the size of the game board (e.g. 3x6): ");
scanf("%dx%d",x,y);
printf("Please select the level of the game (0-9): ");
scanf("%d",l);
printf("Please enter the largest card value (1-99): ");
scanf("%d",m);
printf("Please enter the seed of the random number generator: (0-9999): ");
int s;
scanf("%d",&amp;s);
srand(s);
return;}
</code></pre>

<p>Thanks</p>