alsav22
5434 / 4829 / 442
Регистрация: 04.06.2011
Сообщений: 13,587
|
22.06.2014, 05:07
|
|
C++ | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
| #include<iostream>
#include<fstream>
#include<string>
using namespace std;
int main()
{
setlocale(0, "");
ifstream in("D:\\1.txt");
if(!in)
{
cout << "Ошибка!." << endl;
system("pause");
return 0;
}
string s;
char ch;
while (in.get(ch))
{
if (ch != '*')
s += ch;
else
{
s += "??";
}
}
cout << s << endl;
system("pause");
return 0;
} |
|
В файле:
** asdff sdfd * sdfs
** sdfs ddd*
sdf ssd** sdf8*
1
|