0

Написал программу в Codeblocks на C++. Программа считывает текст с файла и заново его вводит.

char text;
ifstream inFile;
inFile.open("2.txt");
if(inFile.fail()){
    cerr << "Error! " << endl;
    exit(1);
}
vector <string> v;
for(int i = 0; !inFile.eof(); i++){
    inFile.get(text);
    v[i] = text;
}
inFile.close();
ofstream outFile;
outFile.open("2.txt");
for(int f = 0; f < v.size(); f++){

    outFile << v[f];
}
outFile.close();
return 0;

При компиляции выходит эта ошибка. Перезапускал комп, codeblocks, и его настройки компилятора. Устанавливал net framework. Ничего не помогает

0 Answers0