```
class Solution {
public:
vector<int> findDisappearedNumbers(vector<int>& nums) {
vector<int> temp(nums.size());
int i;
for(i = 0; i < nums.size(); ++i){
temp[nums[i] - 1] = 1;
}
int counter = 0;
for(i = 0; i < temp.size(); ++i){
if(temp[i] == 0){
temp[counter] = i + 1;
counter++;
}
}
temp.resize(counter);
return temp;
}
};
```