I want to read a single line from a file. My code looks like this:
#include <iostream>
#include <fstream>
#include <string>
#define pause system("pause");
using namespace std;
string entscheidung;
int main()
{
string s;
//READ IN CODE FILE
cout << "VERZEICHNIS bzw file angeben:";
cin >> entscheidung;
char buffer[256];
ifstream infile;
infile.open("xxx.in.txt");
infile.getline(buffer, 256);
return 0;
}
But somehow, it doesn't work, can somebody help me?