[ create a new paste ] login | about

Link: http://codepad.org/aKRIKYS6    [ raw code | output | fork ]

hmurcia - C++, pasted on Mar 25:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Manejo de archivos     -    ios_base::out|ios_base::in
#include <iostream>
#include <fstream>
using namespace std;

int main() {
    fstream data;
    fstream arch("datos.txt", ios_base::in | ios_base::out);
    if (arch.fail()) {
        cout << "Error al abrir el archivo \"datos.txt\"";
        system("pause>nul");
        return -1;
    }

    data.open("nomina.dat");
    if (!data.good()) {
        cout << "Error al abrir el archivo \"nomina.dat\"";
        system("pause>nul");
        return -1;
    }
}


Output:
1
Disallowed system call: SYS_fork


Create a new paste based on this one


Comments: