aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk7/hw7_directory/HouseDB.cpp
diff options
context:
space:
mode:
authorMatthew Strapp <msattr@gmail.com>2019-05-07 09:58:09 -0500
committerMatthew Strapp <msattr@gmail.com>2019-05-07 09:58:09 -0500
commitdd96ebd1b4e995baac8217daaa76ee20f7a4f615 (patch)
tree40348f5cf384296f26d90703b3260b9c34469744 /ee1301/wk7/hw7_directory/HouseDB.cpp
parentStart HW7 (diff)
downloadhomework-dd96ebd1b4e995baac8217daaa76ee20f7a4f615.tar
homework-dd96ebd1b4e995baac8217daaa76ee20f7a4f615.tar.gz
homework-dd96ebd1b4e995baac8217daaa76ee20f7a4f615.tar.bz2
homework-dd96ebd1b4e995baac8217daaa76ee20f7a4f615.tar.lz
homework-dd96ebd1b4e995baac8217daaa76ee20f7a4f615.tar.xz
homework-dd96ebd1b4e995baac8217daaa76ee20f7a4f615.tar.zst
homework-dd96ebd1b4e995baac8217daaa76ee20f7a4f615.zip
e
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
+}