Untitled

 avatar
unknown
c_cpp
a year ago
418 B
2
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