```
class Solution {
public:
void moveZeroes(vector<int>& nums) {
if (nums.empty()) return;
int count = 0;
int size = nums.size();
for (int i = 0; i < size; ++i) {
if (0 == nums[i]) ++count; // record zeros numbers
else nums[i - count] = nums[i]; // move none-zero item
}
for (int i = size - count; i < size; ++i) {
nums[i] = 0; // fill zero
}
}
};
```