diff options
| -rw-r--r-- | CH11_text_file.txt | 5 | ||||
| -rw-r--r-- | CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp | 12 | ||||
| -rw-r--r-- | Output.txt | 0 | ||||
| -rw-r--r-- | Pseudo Code.txt | 18 |
4 files changed, 29 insertions, 6 deletions
diff --git a/CH11_text_file.txt b/CH11_text_file.txt new file mode 100644 index 0000000..edb3cf3 --- /dev/null +++ b/CH11_text_file.txt @@ -0,0 +1,5 @@ +Thomas 21 +Wyatt 13 +Ben 50 +Matthew 42 +Evan 29
\ No newline at end of file diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp index 2af8ee0..3cb80a3 100644 --- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp +++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp @@ -83,11 +83,11 @@ int main() int record_counter(0); ifstream inFile; - + // My computer refuses to output/run properly // Notice how this automatically opens the file - ofstream outFile("C:\\TEMP\\Chap_11_Report.txt"); - - inFile.open("C:\\Users\\furyf\\OneDrive\\Desktop\\Homework\\CST Homework\\CST116 Ch11\\CH11 text file.txt"); + ofstream outFile("C:\\Users\\furyf\\OneDrive\\Desktop\\Homework\\CST_Homework\\CST116_Ch11\\Output.txt"); + + inFile.open("C:\\Users\\furyf\\OneDrive\\Desktop\\Homework\\CST_Homework\\CST116_Ch11\\CH11_text_file.txt"); if (inFile.is_open()) { @@ -102,13 +102,13 @@ int main() } else { - cout << "Trouble Opening File"; + cout << "Trouble Opening File, out file"; cout << "\n\n\t\t ** About to EXIT NOW! ** "; } } else { - cout << "Trouble Opening File"; + cout << "Trouble Opening File, in file"; cout << "\n\n\t\t ** About to EXIT NOW! ** "; } return 0; diff --git a/Output.txt b/Output.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Output.txt diff --git a/Pseudo Code.txt b/Pseudo Code.txt new file mode 100644 index 0000000..28c0e77 --- /dev/null +++ b/Pseudo Code.txt @@ -0,0 +1,18 @@ +Under main +set chararray name +set intarray age +set record counter to 0 +input infile stream (open CH11 text file) +output outfile stream + +if infile is open +recordcounter is the readdata function +infile close + if outfile is open + writeoutputfile function + printtotalandsummary function + outfile close +anything else +output trouble opening file, out/in file +output about to exit now + |