-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathread4.cpp
More file actions
55 lines (51 loc) · 743 Bytes
/
Copy pathread4.cpp
File metadata and controls
55 lines (51 loc) · 743 Bytes
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <conio.h>
#include <map>
#include <string.h>
using namespace std;
int main()
{
map<string ,string> map;
FILE *fp;
int max=0;
string s,s1;
char ch[1000][1024];
int i=0,j=0,m;
fp=freopen("Language.txt","r",stdin);
ch[0][0]=fgetc(fp);
while(!feof(fp))
{
if(ch[i][j]=='\n')
{i++;j=0;}
else {
j++;
if(max<j) max=j;
}
ch[i][j]=fgetc(fp);
}
for(i=5;i<=16;i++)
{
for(j=0;j<max;++j)
{
if(ch[i][j]!='\n')
s+=ch[i][j];
else
break;
}
i++;
for(j=0;j<max;++j)
{
if(ch[i][j]!='\n')
s1+=ch[i][j];
else
break;
}
map[s]=s1;
s="";
s1="";
}
cout <<map["input1"];
getch();
}