Untitled
unknown
c_cpp
2 years ago
418 B
3
Indexable
#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <math.h>
#include <algorithm>
using namespace std;
string filename = "foo.txt";
int asd()
{
ifstream file(filename);
if (!file.is_open())
{
cout << "ERROR" << filename << endl;
return 0;
}
int n;
file >> n;
file.close();
return n;
}
int main()
{
int n = asd();
cout << "chislo " << n << endl;
}
Editor is loading...
Leave a Comment