-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.hpp
More file actions
40 lines (35 loc) · 913 Bytes
/
utils.hpp
File metadata and controls
40 lines (35 loc) · 913 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
#ifndef TOOLS_H
#define TOOLS_H
#include<stdio.h>
#include<iostream>
#include<string.h>
#include<string>
#include<sys/types.h>
#include<dirent.h>
#include<vector>
#include<map>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include<sys/wait.h>
#include <fcntl.h>
#include <fstream>
#include <utility>
#include <stdexcept>
#include <sstream>
#include <limits>
using namespace std;
#define MAX 1
#define MIN 0
#define SIZE 512
typedef std::vector<std::string> stringvec;
stringvec read_csv(std::string filename);
stringvec read_directory(const std::string& name);
int read_from_fifo(string fifo_path);
void write_to_fifo(int price, string fifo_path);
int return_max(vector<int> vec);
int return_min(vector<int> vec);
std::map<string, int> map_words(stringvec words);
stringvec parse_input(char buf[SIZE]);
void create_process(string province_name,string pipe_name, const char* argv);
#endif