-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReadWriteFile.h
51 lines (43 loc) · 1.46 KB
/
ReadWriteFile.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
50
51
#include <iostream>
#include <string>
using std::string;
#ifndef ReadWriteFile_H
#define ReadWriteFile_H
class ReadWriteFile{
private:
//variable declaration
string filename;
//to contain file name as set by AdjustFilename()
char* fname;
//to be used for file read and write operations
bool cui;
//to contain the choice of whether user wants ui as set by the setui1()
public:
//constructor with default parameters
ReadWriteFile(string f="default",bool cui=0);
//function to set the value of cui
void setui1(bool cui);
//function to readfile
void readfile();
//function to check if file is empty
bool is_empty();
//function to write in file
void writetofile();
//function to excecute program one by one automatically
void ui(string nf="default",bool cui=1);
//function to contain and print Messages for filename change
string textfornamechange(int i);
//function to check filename nf for default values
int abcchecks(string nf);
//function to display name change or file name received by program
void Displayfilenamestate(int i);
//function to set then use the name to display relavent messages
void AdjustFilename(string f="default");
//function to display the options of functionality provided
void displaymenu();
//function to display the request to input the filename
void displayinputrequest();
//destructor to free up memory from the data members
~ReadWriteFile();
};
#endif //ReadWriteFile_H