Вот примерно накидал код программы, помогите реализовать дальше пожалуйста!
В переменную buff считывается строка.
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
| #include <stdio.h>
#include <string.h>
#include <conio.h>
#include <iostream.h>
#include <fstream.h>
void main()
{
clrscr();
char buff[81],str[81];
ifstream infile;
ofstream outfile("output.txt");
infile.open("text.txt");
int i=0;
while (!infile.eof())
{
infile.getline(buff,sizeof(buff));
cout<<buff<<endl;
/* while (i!=2)
{
if (i==1) str=buff[i];
i++;
}
for (int i=0;i<strlen(buff);i++)
{
if (buff)
}*/
}
outfile.close();
infile.close();
getch();
} |
|