diff options
| author | WiserJ <[email protected]> | 2021-12-08 17:42:33 -0800 |
|---|---|---|
| committer | WiserJ <[email protected]> | 2021-12-08 17:42:33 -0800 |
| commit | 5615433ffe4e7299b83c5846e03fdf01ae6f9571 (patch) | |
| tree | f1a5fce38f37cdd5d1df8345fdebd03e6f770d8a | |
| parent | crash (diff) | |
| download | cst116-lab9-jeffwoit-5615433ffe4e7299b83c5846e03fdf01ae6f9571.tar.xz cst116-lab9-jeffwoit-5615433ffe4e7299b83c5846e03fdf01ae6f9571.zip | |
final
| -rw-r--r-- | CST116F2021-Lab9/CST116F2021-Lab9.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/CST116F2021-Lab9/CST116F2021-Lab9.cpp b/CST116F2021-Lab9/CST116F2021-Lab9.cpp index f0034dc..9548b42 100644 --- a/CST116F2021-Lab9/CST116F2021-Lab9.cpp +++ b/CST116F2021-Lab9/CST116F2021-Lab9.cpp @@ -30,6 +30,7 @@ int main() getInput(file_name); readFile(file_name, info, size); + sortData(info, size); while (menu != 5) { @@ -283,13 +284,15 @@ void writeFile(string writeArray[][ARRAY_SIZE], int writeSize, char writeName[NA while (j < ARRAY_SIZE) { if(j != 3) - outFile << left << setw(sizeof(writeArray[i][j]) + 1) << writeArray[i][j] << ' '; + outFile << writeArray[i][j] << ' '; else - outFile << left << setw(sizeof(writeArray[i][j])+ 1) << writeArray[i][j] << endl; + outFile << writeArray[i][j] << endl; + j++; } + j = 0; + i++; } } - outFile.close(); } |