diff options
| author | tylr <[email protected]> | 2021-12-06 12:38:44 -0800 |
|---|---|---|
| committer | tylr <[email protected]> | 2021-12-06 12:38:44 -0800 |
| commit | 5c2fdc0add9db89799eab043ede16d2be20f4d25 (patch) | |
| tree | b87e70992478fb07b2e3e353441db5582e32ddbd /num3 | |
| parent | Complete number 3. (diff) | |
| download | cst116-lab9-till-t-5c2fdc0add9db89799eab043ede16d2be20f4d25.tar.xz cst116-lab9-till-t-5c2fdc0add9db89799eab043ede16d2be20f4d25.zip | |
Num 4 in progress.
Diffstat (limited to 'num3')
| -rw-r--r-- | num3/data2.txt | 2 | ||||
| -rw-r--r-- | num3/hello.txt | 1 | ||||
| -rw-r--r-- | num3/num3.cpp | 9 |
3 files changed, 5 insertions, 7 deletions
diff --git a/num3/data2.txt b/num3/data2.txt index 6f9989e..6b2f590 100644 --- a/num3/data2.txt +++ b/num3/data2.txt @@ -1,4 +1,4 @@ This file was built by Tylr -We included one blank line here? +We included one blank line above Lets see if this works! diff --git a/num3/hello.txt b/num3/hello.txt index 3870db1..572f051 100644 --- a/num3/hello.txt +++ b/num3/hello.txt @@ -2,4 +2,3 @@ Hello! Everything must end in a period for this to work. No period Let's see - diff --git a/num3/num3.cpp b/num3/num3.cpp index d3ea934..16ac4a4 100644 --- a/num3/num3.cpp +++ b/num3/num3.cpp @@ -3,7 +3,6 @@ //Dec 3, 2021 - #include <iostream> #include <fstream> #include <stdio.h> @@ -31,9 +30,9 @@ int main() int record_counter = 0; //arrays - std::string data[MAX]; - int length_arr[MAX]; - int charCount_arr[MAX]; + std::string data[MAX]; //holds strings. + int length_arr[MAX]; //keeps track of full length of strings. Counts characters including spaces. + int charCount_arr[MAX]; // //display the file choices @@ -69,7 +68,7 @@ int main() flag = 0; } - //Builds arrays. See functions below for descriptions. + //Build arrays. See functions below for descriptions. FindLength(data, length_arr); CharCount(data, length_arr, charCount_arr); |