Richard's C++ Ch 6, 7

C++ is case sensitive

Ch 6. Functions

eg032_voidfun.cpp, void return type function, function within function input parameters, return keyword

eg033_markup.cpp, input parameters, input validation, return value

eg034_globalconst.cpp, global constant, local variable, use return value of function

eg035_local.cpp, local variable vs global variable

eg036_reference.cpp, pass (return) variable by reference to function

eg037_reference.cpp, pass (return) variables by reference to function

eg038_refvalue.cpp, playing trick with pass by reference and pass by value to function (from Prof. Smithfield)

eg039_overload.cpp, overloading functions - two or more functions may have the same name, as long as their parameter lists are different

menu1.cpp, using menu and functions.


Ch 7. Arrays

eg040_inout_array.cpp, declare array, input, output, finding size of array

eg041_loop_array.cpp, loop input/output array elements

eg042_readfile_toarray.cpp, reading data from file to array

eg043_parallel_array.cpp, two parallel arrays

eg044_array_function.cpp, pass array to function, update array (pass by reference)

eg045_2D_array.cpp, 2D array, summing the rows, and the total of a 2D array


Ch 8. Searching and Sorting Arrays

eg046_linear_search.cpp, linear search function

eg047_readfile.cpp, read file into string array by checking end of file

eg048_selectionsort.cpp, selection sort (array)