From 5e6d23d23726bd02e59d5e0b884c5a8d392bd0eb Mon Sep 17 00:00:00 2001 From: Birducken Date: Mon, 7 Nov 2022 23:07:36 -0800 Subject: Added psuedo code. Finished. --- .../CST116-Ch11-Debugging-Stark-Psuedo-Code.txt | 23 ++++++++++++++++++++++ .../CST116-Ch11-Debugging-Stark.cpp | 4 ++++ .../CST116-Ch11-Debugging.vcxproj | 1 + .../CST116-Ch11-Debugging.vcxproj.filters | 1 + 4 files changed, 29 insertions(+) create mode 100644 CST116-Ch11-Debugging/CST116-Ch11-Debugging-Stark-Psuedo-Code.txt (limited to 'CST116-Ch11-Debugging') diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging-Stark-Psuedo-Code.txt b/CST116-Ch11-Debugging/CST116-Ch11-Debugging-Stark-Psuedo-Code.txt new file mode 100644 index 0000000..a64e192 --- /dev/null +++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging-Stark-Psuedo-Code.txt @@ -0,0 +1,23 @@ +Trenton Stark +CST 116 +Psuedo Code: + +open report.txt in the same directory as the program +open data.txt in the same directory as the program + +if input file can't be opened print error and exit + +for each line in input file: + put name into character matrix at row line - 1 + put age into int array at index line - 1 + print name and age that was just read + +at end of file put number of row inputted into record_counter +close input file + +if output file can't be opened print error and exit +for recorder_counter times in name[] and age[]: + output name[i] and age[i] to same line in output file + +output summary with number of lines read to console and ouput file +close output file \ No newline at end of file diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging-Stark.cpp b/CST116-Ch11-Debugging/CST116-Ch11-Debugging-Stark.cpp index 2a855bf..d77da6b 100644 --- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging-Stark.cpp +++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging-Stark.cpp @@ -1,3 +1,7 @@ +//Trenton Stark +//CST 116 +//Chapter 11 Debugging + /******************************************************************** * File: Chapter 11 Debug.cpp * diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj index 45366aa..e497115 100644 --- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj +++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj @@ -133,6 +133,7 @@ + diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters index a983ca7..0e17f24 100644 --- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters +++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.vcxproj.filters @@ -23,5 +23,6 @@ + \ No newline at end of file -- cgit v1.2.3