From 5615433ffe4e7299b83c5846e03fdf01ae6f9571 Mon Sep 17 00:00:00 2001 From: WiserJ Date: Wed, 8 Dec 2021 17:42:33 -0800 Subject: final --- CST116F2021-Lab9/CST116F2021-Lab9.cpp | 9 ++++++--- 1 file 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(); } -- cgit v1.2.3