Ответы
Ответ дал:
0
#include "stdafx.h"
#include <iostream>
#include <fstream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
bool s = false;
char fn[255];
cout << "Filename: " << endl;
cin >> fn;
ifstream fin(fn);
while(!fin.eof())
if (fin.get() == 's')
{
s = true; break;
}
fin.close();
cout << "There " << (s ? "is" : "isn't") << endl;
system("pause");
return 0;
}
#include <iostream>
#include <fstream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
bool s = false;
char fn[255];
cout << "Filename: " << endl;
cin >> fn;
ifstream fin(fn);
while(!fin.eof())
if (fin.get() == 's')
{
s = true; break;
}
fin.close();
cout << "There " << (s ? "is" : "isn't") << endl;
system("pause");
return 0;
}
Вас заинтересует
7 лет назад
7 лет назад
10 лет назад
10 лет назад
10 лет назад