-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
40 lines (32 loc) · 714 Bytes
/
main.cpp
File metadata and controls
40 lines (32 loc) · 714 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
#include <iostream>
#include <vector>
#include <cmath>
#include <fstream>
#include <sstream>
#include <string>
#include <istream>
#include <algorithm>
#include "parser.h"
int main() {
std:: ifstream infile("../input.txt");
std::string lineVal;
parser p;
int lineNum = 0;
if(infile.is_open())
{
while(std::getline(infile, lineVal))
{
lineNum++;
std::cout << lineVal << std::endl;
if(p.readLine({lineNum,lineVal}))
{
std::cout << "break" << std::endl;
break;
}
}
}
else
{
std::cout << "cannot open" << std::endl;
}
}