24 lines
384 B
C++
24 lines
384 B
C++
/*
|
|
AUTORE: Manuel Vichi
|
|
Prova file
|
|
*/
|
|
#include <iostream>
|
|
#include <cstring>
|
|
#include <cctype>
|
|
#include <cstdlib>
|
|
using namespace std;
|
|
int main(void){
|
|
FILE *fp = fopen("file.txt","r");
|
|
if (fp != NULL) {
|
|
int ch;
|
|
while((ch = fgetc(fp)) != EOF)
|
|
cout << (char)ch;
|
|
// cout << endl;
|
|
fclose(fp);
|
|
} else {
|
|
perror("Errore: ");
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|