I tried to use vectors
instead of arrays in one of the parts of my program, because of other problems. I have never really used them previously.
This is the part of the code:
#include <vector>
ifstream file("data.txt");
vector<int> beds;
vector<int> people;
vector<int> balconies;
while(!file.eof()){
file >> people.push_back();
file >> beds.push_back();
file >> balconies.push_back();
}
I have no idea if it would be working. Anyway now I have an error: No matching member function for call to 'push_back'
.