-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileProcessor.h
More file actions
executable file
·44 lines (37 loc) · 1.04 KB
/
FileProcessor.h
File metadata and controls
executable file
·44 lines (37 loc) · 1.04 KB
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
// Jaden Heller
// 2328279
// jaheller@chapman.edu
// CPSC-350-01
// Assignment 6
#ifndef FILEPROCESSOR_H
#define FILEPROCESSOR_H
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
class FileProcessor{
public:
FileProcessor();
FileProcessor(string fileName);
~FileProcessor();
string getLinesFromFile(string readFileName);
string* makeArrayFromFile(string readFileName); //Returns each line from the file as an
//element in the array
int getLengthOfFile(string readFileName);
void writeToFile(string writeFileName, string input1, string input2);
bool isTxtFile(string name);
string untranslatedLine;
string outputFile;
string translatedText;
int lineCounter;
private:
string *linesArray; //pointer to an array (as varies depending on the file)
string fileOpenErr;
fstream readFile;
fstream writeFile;
ofstream readWriteFile;
string fileAsString;
string fullLineOfFile;
int numLines;
};
#endif