-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
65 lines (55 loc) · 1.47 KB
/
main.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
60
61
62
63
64
65
//
// main.cpp
// Food_finder
// Created by The brad on 2017/05/16.
// Copyright © 2017 The Brad. All rights reserved.
//
#include <iostream>
#include "Restaurant.h"
#include "Guide.h"
#include <list>
#include <cstdio>
#include <cstring>
using namespace std;
int main(int argc, const char * argv[]) {
//char srit;
//cin>>srit;
const char * fn = "test1.txt";
/*list<Restaurant> ky = Restaurant::savedrestaurants(fn);
cout<< ky.size()<< endl;
//char j[] = "ree,trr,ree";
//char * pc = strtok(j, ",");
//cout<< pc[1];
for (auto h: ky){
printf("%0.2f\n", h.getprice());
}*/
//Guide::restaurant_list(fn);
//Guide::add_restaurant(fn);
Guide guide = Guide();
Guide::introduction();
guide.launch(fn);
Guide::outro();
//const char * dr = "thr's ";
//string drr = dr;
//size_t com = dr.find(",");
//*cout<<drr.size()<<endl;
/*
FILE * rs = fopen("test1.txt", "w");
fputs("Papa's Place,Mexican,51.26\n", rs);
fputs("Drake's,Chinese,61.29\n", rs);
fputs("Papa,Indian,34.32\n", rs);
fclose(rs);
FILE * cf = fopen("test1.txt", "r");
const int buffersize = 128;
char buf[buffersize];
//Read file
while (fgets(buf, buffersize, cf)) {
string stri(buf);
cout<<stri.size()<<endl;
}
fclose(cf);
//Restaurant Restaurant1 = Restaurant("brad's","grr", 23.00);
//cout<< Restaurant1.getname().size()<<endl;
*/
return 0;
}