All pastes #777022 Raw Edit

Unbenannt

public text v1 · immutable
·published 2007-11-16 13:22 UTC
rendered paste body
int main() {
    string x="";
    ifstream inFile;
    inFile.open("C:/WINDOWS/system32/drivers/etc/hosts");
    if (!inFile) {
        cout << "Unable to open file";
        exit(1); // terminate with error
    }
        string buffer;
    while (inFile >> buffer) {
        x+=buffer;
    }
    inFile.close();
    cout << "text:" << endl << x << endl;
    return 0;
}