Created
March 10, 2015 14:09
-
-
Save duyet/39efb003f6aef25fba8d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <conio.h> | |
#include <string> | |
#define MAX 1000 | |
int main() | |
{ | |
FILE* f; | |
char str[300]; | |
int anh[300]; | |
char *str1,*str2; | |
int i=0; | |
string english[MAX]; | |
f = fopen("va.dd","rt"); | |
int c = 0; | |
while (fgets(str,300,f)>0 && c < 1000) | |
{ | |
str1 = strstr(str,"##"); | |
if (str1!=NULL) | |
{ | |
str2 = strstr(str1,"|-"); | |
if (str2!=NULL && strlen(str2+2)<15) english[c] = (str2+2); | |
} | |
//getch(); | |
} | |
fclose(f); | |
for (int i = 0; i < c; i++) { | |
puts(english[i]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment