Warum machst Du des nicht so wie ich es geschrieben habe?
char frage[1024];
char antwort[30];
int zaehler;
char afilename[20], qfilename[20];
cout << "Enter File: ";
cin >> qfilename;
cout << "Gruppennummer";
cin >> afilename;
ifstream questions;
ofstream answers;
questions.open(qfilename, ios_base::in);
answers.open("answer.txt", ios_base::app);
while (!questions.eof())
{
questions.getline(frage, 1024);
cout << frage << endl;
fflush(stdin);
cin.getline(antwort, 1024);
answers << antwort << endl;;
}
questions.close();
answers.close();
[/code]
Frank