-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFile.h
More file actions
38 lines (29 loc) · 646 Bytes
/
File.h
File metadata and controls
38 lines (29 loc) · 646 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
/*
* File.h
*
*
* Created by Donald House on 2/18/11.
* Copyright 2011 Clemson University. All rights reserved.
*
*/
#ifndef __MYFILE__
#define __MYFILE__
#include <cstdlib> // standard C utility library
#define MAXLINESIZE 4096
class File{
protected:
char *filename; // Name of file
char line[MAXLINESIZE];
int lineno;
void stripwhite(char *line);
bool str_pfx(char *str, char *pfx);
bool str_sfx(char *str, char *sfx);
void errmsg(char *msg);
public:
File(char *filename = NULL);
~File();
void setfilename(char *fname);
char *getfilename();
virtual int read(char *fname = NULL) = 0;
};
#endif