-
Notifications
You must be signed in to change notification settings - Fork 3
/
InOutFiles.h
49 lines (44 loc) · 1.4 KB
/
InOutFiles.h
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
#pragma once
#ifndef __INOUTFILES_H_
#define __INOUTFILES_H_
#ifdef __cplusplus
extern "C" {
#endif
struct customerr {
char* name;
char* phone;
int cip[2];//customer's initial position
int cfp[2];//customer's final position
};
typedef struct customerr customer;
struct driverr {
char* name;
char* phone;
char* numberPlt;
int dp[2];//driver's present position
};
typedef struct driverr driver;
struct BillForCus {
char* cusName;
char* drvName;
char* pltNum;
int fee, time1, time2;
};
typedef struct BillForCus billForCus;
int actualLength(const char* string);
char* readline(int lineNumber, const char* txtFile);
int* getpos(int line, const char* filename);
int count(const char* obj);
customer* constructC(int num, customer* c);
driver* constructD(int num, driver* d);
// int** allocate(int number_of_row, int number_of_cols);
// void printMat(int** arr, int num_of_rows, int num_of_cols);
void getCusCip(int** CusCipMat, customer* c, int numOfCus);
void getCusCfp(int** CusCfpMat, customer* c, int numOfCus);
void getDrvDp(int** DrvDpMat, driver* d, int numOfDrv);
billForCus* constructBill(int num, billForCus* bill, int** timeFeeMat, customer* c, driver* d);
void printBill(int numOfBill, billForCus* bill);
#ifdef __cplusplus
}
#endif
#endif