aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk7/hw7_directory/HouseDB.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ee1301/wk7/hw7_directory/HouseDB.cpp')
-rw-r--r--ee1301/wk7/hw7_directory/HouseDB.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/ee1301/wk7/hw7_directory/HouseDB.cpp b/ee1301/wk7/hw7_directory/HouseDB.cpp
index 6981161..a0aeebc 100644
--- a/ee1301/wk7/hw7_directory/HouseDB.cpp
+++ b/ee1301/wk7/hw7_directory/HouseDB.cpp
@@ -19,17 +19,17 @@ public:
};
-void ProcHeader(ifstream &file);
+void ProcHeader(ifstream &file);
houseData* ReadRecord(ifstream &file);
void DelRecord(houseData *record);
void printAllHousesByZip(houseData* head);
int main(int argc, char* argv[]) {
- // This line must be removed in your final
+ // This line must be removed in your final
// program (see HINT 1).
houseData* initHouseData[10];
-
+
ifstream fin;
if(argc > 1) {
fin.open(argv[1]); // Small file to test with
@@ -62,14 +62,14 @@ int main(int argc, char* argv[]) {
printAllHousesByZip(head);
- //This loop will also have to change in your
+ //This loop will also have to change in your
// final program (see HINT 1).
- for(int a = 0; a<numRec ; a++) {
+ for(int a = 0; a<numRec ; a++) {
DelRecord(initHouseData[a]);
}
fin.close();
-
+
} else {
cout << "File missing!" << endl;
return 1;
@@ -102,10 +102,10 @@ houseData* ReadRecord(ifstream &file) {
while(!endOfHeader) {
char curChar;
-
+
//Get the next character in file
curChar = file.get();
-
+
//Check what the character is
if (curChar == EOF) {
return nullptr;
@@ -163,4 +163,4 @@ void printAllHousesByZip(houseData* head){
current->printShort();
current = current->nextZip;
}
-} \ No newline at end of file
+}