-
Notifications
You must be signed in to change notification settings - Fork 0
/
uwb.cpp
47 lines (43 loc) · 826 Bytes
/
uwb.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
#include<fstream>
#include<iostream>
#include<string>
#include<iomanip>
#include<unistd.h>
using namespace std;
#define _MAX_PATH 300
int main()
{
string s;
ifstream infine;
string filestr;
string filestr1;
string logpath;
string logoutpath;
logpath="//data//trek1000//log1.txt";
logoutpath="//data//trek1000//log111.txt";
char buffer[_MAX_PATH];
if(! getcwd(buffer,_MAX_PATH))
{
cout<<"error"<<endl;
}else
cout<<buffer<<endl;
filestr=buffer;
filestr1=buffer;
filestr+=logpath;
infine.open(filestr);
cout<<filestr<<endl;
ofstream outf;
filestr1+=logoutpath;
outf.open(filestr1);
cout<<filestr1<<endl;
while(getline(infine,s))
{
if(s.find("TS")!=string::npos)
{
outf<<s<<'\n';
cout<<s<<endl;
}
}
/* code */
return 0;
}