```
void moveZeroes(int* nums, int numsSize)
{
int i, j;
int temp;
for(i = 0, j = i+1; i < numsSize; i++)
{
if(nums[i] == 0)
{
while(nums[j] == 0)
{
j++;
if(j >= numsSize)
break;
}
temp = nums[j];
nums[j] = nums[i];
nums[i] = temp;
j++;
if(j >= numsSize)
break;
}
}
}
```

My codes is correct in Dev-C++. But when I submit it to the system of leetCode, why it is wrong?