-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparser.cpp
executable file
·59 lines (50 loc) · 1.48 KB
/
parser.cpp
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
56
57
58
59
//#include <iostream>
#include <fstream.h>
#include <string>
//2004-12-14
//David Strube
//parser
//input: some rows from running
//\\Wwwserver\ftproot\EP_Integrity_Check_Scripts\EPRO to Millbrook integrity check EPRO 2.sql
//against a db
//Output = procedure ids
int main(){
/***********************
start things off, get stuff initialised
*************************/
ifstream infi ("missing_cpt_icd.txt");
ofstream outfi ("out.txt");
string intemp, outemp;
//string findme="118";
int findme_L=0;
//int size=0;
//int space_L=0;
int count=0;
/***********************
now the fun begins
*************************/
while (getline(infi, intemp)){
//cout<<"testing "<<intemp<<endl;
//findme_L=intemp.find(findme);
//size=intemp.size();
findme_L=intemp.rfind(" ");
//if (findme_L!=-1) {
//cout<<".found the billing id:\n"<<intemp<<endl;
outemp=intemp.substr(findme_L+1);
outfi<<outemp<<"\", \"";
//cout<<outemp<<endl<<"Found at "<<findme_L;
count++;
//}
//else
//cout<<"not .jpg:\n"<<intemp<<endl;
//cout<<"intemp.find(jpg) = "<<jpg_L<<endl;
//getline(infi, intemp);
//size=0;
//space_L=0;
//findme_L=0;
}
infi.close();
outfi<<"\ncount: "<<count;
outfi.close();
return 0;
}