I have a function like such

Code:
#include <cstdlib>

inline int randInt(int limit)
{
    return limit <= 1 ? 0 : (rand() % limit);
}
And i use it as followd
Code:
if(randInt(2) == 1)
{
   column = ((randInt(2) == 1) ? (lastTemp.c + randInt(4)) :   (lastTemp.c - randInt(4)));
   row = lastTemp.r;
}
else
{
  column  = lastTemp.c;
  row = ((randInt(2) == 1) ? (lastTemp.r + randInt(4)) : (lastTemp.r - randInt(4)));
}
And my lastTemp.c and latTemp.r are both = 0;
I get the same sequence every time. which is
r - c
0 - 0
0 - 3
1 - 0
2 - 1
0 - 2
3 - 0

how come i dont get 2 - 0 ?