diff options
author | Matthew Strapp <msattr@gmail.com> | 2019-05-07 09:58:09 -0500 |
---|---|---|
committer | Matthew Strapp <msattr@gmail.com> | 2019-05-07 09:58:09 -0500 |
commit | dd96ebd1b4e995baac8217daaa76ee20f7a4f615 (patch) | |
tree | 40348f5cf384296f26d90703b3260b9c34469744 | |
parent | Start HW7 (diff) | |
download | homework-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
-rw-r--r-- | ee1301/wk7/hw7_directory/HouseDB.cpp | 18 | ||||
-rw-r--r-- | ee1301/wk7/hw7_directory/house-info-v4-short.csv | 2 |
2 files changed, 10 insertions, 10 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 +} diff --git a/ee1301/wk7/hw7_directory/house-info-v4-short.csv b/ee1301/wk7/hw7_directory/house-info-v4-short.csv index 5c7874d..d169ee1 100644 --- a/ee1301/wk7/hw7_directory/house-info-v4-short.csv +++ b/ee1301/wk7/hw7_directory/house-info-v4-short.csv @@ -1,6 +1,6 @@ id,price,bedrooms,bathrooms,sqft,yr_built,zipcode
1370804430,543115,2,1,1380,1947,98199
3744000040,518380,4,2.5,2810,2014,98038
-3313600266,190000,3,1,1180,1966,98002
+3313600266,190000,3,1,1180,1966,98072
7214800190,490000,4,2.25,2110,1978,98072
293000068,556000,3,1.75,1640,1948,98126
|