<s>[INST] This C++ code snippet seems to have an issue. The goal is to add all numbers in a file into a `std::vector` of integers. The code is supposed to read line by line and parse the integer from each line. However, the issue is that it fails to read the file and put the numbers into the vector if the file contains both positive and negative numbers.

The code snippet is:
```cpp
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <string>

int main() {
    std::ifstream file("numbers.txt");
    std::vector<int> numbers;
    std::string line;

    if (file.is_open()) {
        while (std::getline(file, line)) {
            std::istringstream ss(line);
            int number;
            if (ss >> number) {
                numbers.push_back(number);
            }
        }
        file.close();
    } else {
        std::cout << "Unable to open file";
        return 1;
    }

    for (auto number : numbers) {
        std::cout << number << " ";
    }
    return 0;
}
```

The issue is likely with how the code is using `std::istringstream` or not handling the lines of the file correctly. I've tried a few variations but haven't found a solution that works correctly for both positive and negative numbers.

Can you fix this code to properly parse the numbers from the file and add them to the vector, regardless of whether the file contains positive or negative numbers?[/INST]