Код: Выделить всё
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_all
Код: Выделить всё
#include
#include
#include
#include
#include
using namespace std;
int main() {
vector loading;
int line;
fstream plik;
plik.open("bin.txt", ios::in);
if(plik.good()==true) {
while(!plik.eof()) {
plik>>line;
loading.push_back(line);
}
plik.close();
}
sort(loading.begin(), loading.end());
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79168011/why-this-error-terminate-called-after-throwing-an-instance-of-stdbad-alloc[/url]
Мобильная версия