CS111编程辅导 、C++语言程序辅导
Homework 1: Basic Knowledge of C++
C++ : CS111
MUST 2025 Spring
March 04, 2024
I. Design of the Homework
In this homework, we will practice some key points of C++ in chapters 1 to 9 of the textbook, not covering
class definitions. A sequence of numbered tasks is designed (described in Section IV). Each task requires
writing some simple code to reflect your understanding of some knowledge of C++. The appendix describes
the key points of C++ covered by this homework in more detail.
The highlights of this homework include:
A software engineering task. The program can read and write event records in a specific format.
Practice with C++ features such as namespaces, templates, function overloading, and data structures
like linked lists.
II. Requirements of the Homework
Write a C++ program that satisfies two aspects of requirements:
A: Use the C++ style as much as possible
If there are different ways to write the code, choose the C++ way, not the C way, unless the task requires the
C way. For example:
For input and output, use cout and cin , instead of printf() and scanf() .
Include the header file cstring instead of string.h .
Use the new operator instead of calling the function malloc() .
Use an ofstream or ifstream object to open a file, instead of calling the fopen() function.
Use true or false instead of 1 or 0 for logical values.
B: Implement each task described in Section IV
For each task described in Section IV, say the nth task in your program, you should write some comment of
the form /* */ beside the statements of the task. The comment should be at the top or beside the
first line of the code for the task.
For example, suppose the 5th task is:
5: Declare a variable of type int .
The corresponding code for this task could be:
If a piece of code covers several tasks, then the task numbers can be mentioned together. For example, if a
statement covers tasks 4 and 6, its comment can look like this:
III. The Format of a File of Event Records
You're absolutely right! The example of the input file is an important part of the document, as it helps
students understand the expected format of the event records file. I mistakenly removed it during the
revision process. Let me reinsert that section back into the document.
Here’s the reinstated section with the example input file:
Example of the Input File
An example of such a file is described below:
int x; /* <5> */
/* <4> <6> */
some code statement ...
1
2025 02 22
2 *> meeting <*/>
15 30 00 17 00 00 *> hour minute second hour minut second <*/>
We will discuss how to study programming and algorithms this semester.
The location is at A201.
2
2025 05 31
1 *> birthday *>
Tommy Goodguy
Do not forget to bring the gift, the guitar that Tommy wants. Also, a cake with cheese.
The following picture is found at:
https://ascii.co.uk/art/guitar
_____
q o o p
q o!o p
d o!o b
\!!!/
|===|
|!!!|
|!!!|
|!!!|
|!!!|
|!!!|
_|!!!|__
.+=|!!!|--.`.
.' |!!!| `.\
/ !===! \\
| /|!!!|\ ||
\ \!!!!!/ //
) `===' ((
.' !!!!! `..
/ !!!!! \\
| !!!!! ||
| !!!!! ||
| !!!!! ||
\ ======= //
hjw `. ooooo .;'
`-._______.-'
3
2025 03 05
3 *> Other *>
Homework 1 is published
Finally, the homework 1 document is available. It should be a good one.
I am happy.
_ _ __ ____ ____ _ _
( )_( ) /__\ ( _ \( _ \( \/ )
) _ ( /(__)\ )___/ )___/ \ /
(_) (_)(__)(__)(__) (__) (__)
The ascii art is found at:
https://patorjk.com/software/taag/#p=display&f=Bulbhead&t=Happy
3
2025 04 01
3 *> other<*/>
Something I want to say
To read some integer from a string, I found that the stringstream class is really
convenient.
Explanation of the Example File
The file's content should be in a specific form, with the requirements listed below:
The file should start with the tag and end with the tag .
Each record has a sequence of parts:
The id part, an integer, appears between two tags and .
The date part, which has three integers of the year, month, and day, appears between
and .
The type part, an integer (1, 2, or 3) appears between and .
The information part, which is some string between the and tags. The
beginning and ending whitespace characters are ignored.
When type is 1, which means "birthday", the information part is a short string, a person's
name.
When type is 2, which means "meeting", the information part should be six integers,
representing the starting time (hour, minute, and second) and the ending time.
When type is 3, which means "other", the information is a short string.
The details part, which is some string between the and tags. The
beginning and ending whitespace characters are ignored.
A comment, a string between the two tags *> <*/> , can appear at the ending position of a
part. So, the tag *> can also mark the end of a part. A comment will be ignored when a
program reads the file into memory.
IV. Tasks
This section describes a list of tasks that must be fulfilled in the program. Each task is described in this
document. Some task descriptions have additional information marked with some tags, as explained below:
[hint]: Some hints on how to do the task.
[design]: Some of the design ideas for the task.
[rule]: Some generally applicable rules for writing C++ code.
/* ------ Files of the Program ---------*/
Task 1: Create Files for the Program
Create several files for this program, which are described briefly below:
data.h : Declares some data types that can be generally used.
io.h : Declares some types and functions supporting general input/output purposes.
alg.h : Contains declarations of the functions related to computation tasks defined by alg.cpp .
calendar.h : Contains the referential declarations of names (including the prototypes of some
functions defined in calendar.cpp ), type declarations, macros, and some inline functions.
io.cpp : Contains the definitions of functions related to input and output.
alg.cpp : Contains the definitions of algorithm-related functions for solving some computation
problems, especially explicit specialization for some function templates.
calendar.cpp : Defines functions and data related to implementing a calendar.
test.cpp : The driver; it contains the main() function. Through main() , other program functions will
be called and tested.
info.txt : A file that your program will read and write. It is initially empty.
[hint]: No need to write some comment <1> about this task.
Task 2: Protect .h Files with #ifndef
All .h files should be protected by #ifndef and #endif .
[hint]: Doing so prevents a header file from being included multiple times in a .cpp file, which may incur
the mistake of repetitive declarations.
/* ----------------- data.h --------------------- */
Task 3: Define SHORT_TEXT_LEN
In data.h , create a symbolic constant:
SHORT_TEXT_LEN , which is 50, is defined using #define . The length limit of a short piece of text, like a
location or a person's name.
Task 4: Declare Time Structure
In data.h , declare a structure type Time representing some time in a day, which contains three fields:
hour : An unsigned integer, which should be between 0 and 23.
minute : An unsigned integer, which should be between 0 and 59.
second : An unsigned integer, which should be between 0 and 59.
Task 5: Declare Weekday Enum
In data.h , declare an enum type Weekday , which contains the enumerators for each day in a week: SUN,
MON, TUE, WED, THU, FRI, SAT .
Task 6: Declare Month Enum
In data.h , declare an enum type Month , which contains the 12 enumerators of each month, from JAN to
DEC .
[hint]: Use the first three letters of the English word of the month. A good style is to let an enumerator be in
all uppercase.
Task 7: Declare Date Structure
In data.h , declare a structure type called Date , which has three fields:
year : An unsigned int.
month : Of the type Month .
day : Representing a day number in the month.
Task 8: Declare Data Structure
In data.h , declare a structure type called Data , which has two fields:
addr : Of the type void * , representing the starting address of a sequence of bytes.
len : Of the type unsigned int , representing the number of bytes in the sequence of bytes.
[design]: Data will be used in a node of a linked list.
Task 9: Declare Namespaces FIE and SCSE
In data.h , declare a namespace FIE , which has a member url that can record a C-string. Another
namespace SCSE is nested inside FIE , which also has a member url that can record a C-string.
[hint]: The two url variables should be referentially declared in this header file.
/* ----------- list.h -------------- */
Task 10: Use Namespace CS111
In list.h , all the declared names (type, variable, array, function) should belong to the namespace CS111 ,
except those created by #define .
[rule]: Putting symbolic names created by #define in a namespace is not a good idea because they can still
be used as global names. Doing so will be confusing because these names may appear to belong to both
the global scope and the namespace scope.
Task 11: Include Needed Header Files
The file list.h should include the needed header files.
Task 12: Declare Node Structure
In list.h , declare a structure type called Node , which has three fields:
data : A variable of the type Data .
prev : A pointer to a Node , recording the address of the previous node in the list.
next : A pointer to a Node , recording the address of the next node in the list.
[design]: We will use doubly-linked lists.
Task 13: Declare List Structure
In list.h , declare a structure type called List , which has three fields:
head : The address of the first node in the list.
tail : The address of the last node in the list.
len : The length (number of nodes) in the list.
[hint]: When a list is empty, its head and tail are nullptr .
[rule]: In C++ programming, using nullptr is better than using NULL . Generally, nullptr can replace
NULL .
Task 14: Declare add_list_node Function
In list.h , declare a function add_list_node() . It is described as follows:
Parameters:
listp : A pointer to a List struct.
d : A Data variable.
clone_data : A function pointer, pointing to a function of the form: Data function_name(Data
x) . Such a function can make a clone (independent copy) of a Data object x . The memory space
of the clone's content should be dynamically allocated on the Heap.
Computation:
Use the clone function to make a clone of d ; put the clone in a new node ( Node object), and
append it to the list of listp . So, the list of listp will be changed.
Return: Nothing.
Task 15: Declare delete_list Function
In list.h , declare a function delete_list() , as described below:
Parameters:
listp : A pointer to a List struct.
delete_data : A function pointer, describing a function of the form: void f(Data d) . Such a
function can delete the data of d in some proper way.
Computation:
Delete the list's nodes (and their content) one by one. Especially, the data of each node should
be deleted by using the function delete_data .
The List struct pointed to by listp should be changed to represent an empty list.
Return:
An integer, the number of nodes deleted by this function. Normally, it should be the original list
length.
Task 16: Declare print_list Function
In list.h , declare a function print_list() :
Parameters:
listp : A const pointer to a List struct.
print_func : A function pointer, representing a function of the form: void f(Data d) . Such a
function can print a piece of Data .
Computation:
Use the function print_func to print the data of the list's nodes (and their content) one by one.
Return:
The value of listp is returned, representing the unchanged list.
[design]: The return type is List * , instead of void , so that the function call can be nested in a larger
expression, to make the code more compact. For example:
[rule]: A function with some return value is generally more useful than a function with void return. The
returned value may not be used, but that is okay.
/* ------------- io.h --------------- */
Task 17: Include Header Files
io.h should include data.h and other needed header files.
Task 18: Declare clear_input_queue Function
In io.h , declare a function clear_input_queue . It has no parameters and no return.
Computation:
delete_list(print_list(list, print_func), delete_data_func);
It uses the cin object. If the previous input operation of cin failed, its failure status should be
cleared, otherwise cin will resume its working status.
The remaining characters in the input queue of the cin stream will be removed.
[hint]: Do not use getchar() , use C++'s get() instead. Note that cout.clear() or cout.sync() does
not work to clear the input queue.
[rule]: Since the cin object and the stdin stream share the same underlying memory, the input queue of
stdin is also cleared when the input queue is cleared through cin .
Task 19: Declare get_menu_choice Function
In io.h , declare a function get_menu_choice .
Parameter:
choices : Representing an argument of a C-string constant.
Computation:
Print a message, asking the user to type a character that belongs to choices .
Receive a character of the user's input. If it does not appear in choices , case-sensitive, then print
some error message and ask for the user's input again.
The input queue should be cleared after each input, by calling the function
clear_input_queue() .
Return:
Finally, a character in choices is returned, which is the user's input.
[design]: This function is used for accepting the user's choice for a menu item. Before calling this function,
the menu content should be displayed.
Task 20: Declare read_text_from_file_to_string Function
In io.h , declare a function read_text_from_file_to_string .
Parameters:
file : A reference to an ifstream object.
str : A pointer to a C++ string object.
Computation:
Read the sequence of characters from the file , and record them sequentially in the string str .
So, str will be changed.
Return:
An integer, the number of characters read from the file .
[hint]: You may want to make sure that the reading position starts from the beginning of the file . Calling
some member function of ifstream can do that.
Task 21: Declare input_int Function
In io.h , declare a function input_int .
Parameters:
clearQueue : A bool variable, whose default value is true .
If it is true, the input queue is always cleared after the input operation.
If it is false, then after the input operation, the input queue is not cleared.
Computation:
Accept the user's input. If no integer can be received, show some error message to let the user do
the input again, clear the input queue, and resume the working status of cin . Repeat until an
integer is correctly received.
If clearQueue is true, call the function clear_input_queue() ; otherwise, the function is not
called.
Return: The received integer.
[rule]: Some message must be printed before an input operation, to guide the user.
Task 22: Declare input_short_text Function
In io.h , declare a function input_short_text .
Parameters:
arr : A pointer to char , the address of the first character in an array.
len : The number of elements in the array of arr .
Computation:
Record a line of text, allowing multiple words in the line, and save it into arr . At most len-1
characters are recorded, and the ending \n is discarded.
The input queue is always cleared after calling this function.
[hint]: Can repeat calling the function get() to accept at most len-1 characters. Only when \n is not
received yet, clear the input queue. If \n is already received, discard it, and no need to clear the input
queue because it is already empty.
Task 23: Declare input_long_text Function
In io.h , declare a function input_long_text .
Parameters:
ending : A string representing the ending of the input. A short string without whitespace in it.
Computation:
Record the user's input, which can be multiple lines, into a C++ string object.
The input ends with the first appearance of ending .
The input queue is always cleared after the input operation.
[hint]: To append a character ch to a string str , we can do str += ch .
/* ------------- calendar.h ------------- */
Task 24: Include Header Files
calendar.h should include data.h and other needed header files.
Task 25: Declare EventType Enum
In calendar.h , declare an enum type called EventType , which defines the following enum values:
BIRTHDAY
MEETING
OTHER
Task 26: Declare Event Structure
In calendar.h , create a structure ( struct ) data type called Event . It contains four fields:
id : A positive integer, unique to an event.
date : A Date object, describing the year, month, and day.
type : An enumerator (enum value) of EventType .
info : A union containing three members:
name : An array of SHORT_TEXT_LEN characters. When type is BIRTHDAY , it is the name of the
person.
duration : An array of two Time objects, the starting time and the ending time.
title : An array of SHORT_TEXT_LEN characters. When the type is OTHER , it is a short event
description.
details : A C++ string object recording some detailed description of the event.
[design]: A reason to use the string type, instead of a C-string, for the details member is that there is no
apparent length limit.
[rule]: It is not allowed to put a member whose size is not certain in a union. Therefore, a C++ string
object cannot appear in a union. So, for the union type Event , title or name cannot be a C++ string .
Task 27: Declare read_events_from_file_to_list Function
In calendar.h , declare a function read_events_from_file_to_list .
Parameters:
file : A reference to an ifstream object, should be open in text-readable mode. The file should
have the required format as stated in Section III.
list : A reference to a List (declared in list.h ).
Computation:
Read the content of the file into a linked list (declared in list.h ).
Return: A bool value:
true if reading the events from the file is successful.
false if anything is wrong during the process of reading the file.
Task 28: Declare write_events_from_list_to_file Function
In calendar.h , declare a function write_events_from_list_to_file .
Parameters:
file : A reference to an ofstream object, should be open. The file should have the required
format as stated in Section III.
list : A reference to a List (declared in list.h ), where the data of each node is an Event .
Computation:
Write the content of each event of the list to the file, according to the required format.
Return: A bool value:
true if writing the events to the file is successful.
false if anything is wrong during the process of writing to the file.
Task 29: Declare input_event Function
In calendar.h , declare a function input_event .
Parameter: listr : A reference to a List .
Computation:
Asks the user to input the values of the fields of an event from the keyboard. Especially:
No need to input the id . It will always be max_id + 1 , where max_id is defined in
calendar.cpp . Then max_id will be incremented.
For inputting the type, we can use 1, 2, 3 to represent the three types.
No need to input comments. Comments can be directly added to a text file.
Before inputting each field, a prompt message should be printed to guide the user.
After each input, the input queue is cleared.
When input fails, some error message is printed, and the user is asked to do the input again.
Task 30: Declare print_event Function
In calendar.h , declare a function print_event .
Parameter: A const reference to an Event .
Computation: Print the information of the event properly.
Return: Nothing.
Task 31: Declare print_month Function
In calendar.h , declare a function print_month .
Parameter: m : A Month value.
Computation: Print the days of month m in 2025.
Return: Nothing.
[hint]: The weekday of each day can be computed using the day number of each month and the weekday of
2025 Jan 1. These are all recorded in calendar.cpp .
Task 32: Declare show_menu Function
In calendar.h , declare a function show_menu . It has no parameters and no return. It prints something like:
Task 33: Declare run_calendar Function
In calendar.h , declare a function run_calendar . It has no parameters and no return. Its computation is as
follows:
Repeat:
Print the menu.
Ask the user to type a character:
If the choice is a , ask for a file name, and call the function read_events_from_file_to_list .
If the choice is b , ask for a file name, then call the function write_events_from_list_to_file .
------------- Menu of Calendar -----------
a: reading a file into list of events
b: writing the list of events to a file
c: print the list of events
d: adding an event to the list of events
e: show the calendar of a month of 2025
f: show the calendar of all months of 2025.
g: show the events of a day
Q: quit using the calendar
-------------------------------------------
If the choice is c , print the list of events. I.e., for each node, call the function print_event .
If the choice is d , call the function input_event .
If the choice is e , ask for a month number, and call the function print_month .
If the choice is f , call the print_month for each month of 2025.
If the choice is g , ask the user to input a date (month and day) of 2025, and find in the
eventList , all the events on that day.
If the choice is q , call the function delete_list in some proper way, and quit the loop.
/* ------- alg.h ----------- */
Task 34: Include Header Files
In alg.h , include the library header files as stated below:
The header file for the library functions isspace and strlen .
The header file for cout and cin .
The header files tools.h , data.h , and other header files as needed.
Task 35: Declare season Function
In alg.h , declare a function season() .
Parameter: month : Of the type Month .
Computation:
If month is among FEB , MAR , APR , it prints Spring .
If month is among MAY , JUN , JUL , it prints Summer .
If month is among AUG , SEP , OCT , it prints Autumn .
If month is among NOV , DEC , JAN , it prints Winter .
Return: Nothing.
Task 36: Declare grade Function
In alg.h , declare a function grade() .
Parameter: score : A float.
Computation: Return a C++ string object, according to the following conditions:
If score >= 93 , return "A+".
If 88 <= score < 93 , return "A".
If 83 <= score < 88 , return "A-".
If 78 <= score < 83 , return "B+".
If 73 <= score < 78 , return "B".
If 68 <= score < 73 , return "B-".
If 63 <= score < 68 , return "C+".
If 58 <= score < 63 , return "C".
If 53 <= score < 58 , return "C-".
If 50 <= score < 53 , return "D".
Otherwise, if score < 50 , return "F".
Task 37: Declare fib_mem Function
In alg.h , declare a function fib_mem() , described as follows:
Parameter: A non-negative integer n . You can decide the type of n .
Computation:
It maintains a C++ array object of 30 integers (the largest integer type), called mem . Initially, all
elements in it are 0. mem should have static duration. It works as some internal memory of the
function.
The return value of fib_mem(n) is the nth Fibonacci number, denoted as fibn, defined as follows:
If n <= 2 , fibn = 1.
Otherwise, fibn = fibn-1 + fibn-2.
fib_mem(n) is computed as follows:
If n < 1 or n > 30 , print a message like "Error: fib(n) cannot be computed" , and
return 0.
If mem[n-1] is not 0, which means fibn has been computed already, return mem[n-1] .
Otherwise, compute the value of fibn, store it in mem[n-1] , and return it.
Task 38: Declare print_fibs Function
In alg.h , define a function print_fibs .
Parameter: stm : An object representing some output stream, like cout . The type stm should also
support printing data through the stream to some file on disk.
Computation:
It prints through stm some Fibonacci numbers and the ratios of fibn / fibn-1.
Each Fibonacci number should be printed as a separate row. At most 30 Fibonacci numbers are
printed, each as a separate row. The printing can stop when fib_mem() has some overflow in its
computation. When overflow occurs, the printing stops, and some error message should be
printed.
A table with three columns will be printed, shown as follows. Note that the middle column is right aligned.
[hint]: When overflow occurs for adding two positive integers, the result can be a strangely smaller integer.
Task 39: Define max Template Function
In alg.h , define a template inline function max .
Parameter:
It has a template type parameter T .
It has three parameters a , b , and c , all belonging to the type T .
Computation:
The function body has only one statement, returning the largest among a , b , and c .
Some comparison operators, like < , <= , or > , are used.
The conditional operator ( ? ) is used.
[rule]: It is common to put inline function definitions in a header file. A template function can also be inline.
Task 40: Define vector_max Template Function
In alg.h , define a template function vector_max .
Parameter:
It has a template type parameter T .
v : A vector of type T .
Computation:
The largest element in the vector is returned. Logical operators are used to compare the
elements.
Task 41: Declare Explicit Specialization of vector_max
In alg.h , declare an explicit specialization of the function vector_max , when the type T is replaced by the
type Data . The Data object with a larger len value is considered larger.
n fib(n) fib(n)/fib(n-1)
1 1 1.00000
2 1 1.00000
3 2 2.00000
4 3 1.50000
5 5 1.66666
...
[rule]: An explicit specialization function is a regular function. So it is proper to put its prototype in a header
file.
Task 42: Declare sum_rec Function
In alg.h , declare a (non-tail) recursive function sum_rec to compute and return the sum from 0 to n ,
given a non-negative integer n as its parameter.
Task 43: Declare sum_while Function
In alg.h , declare a function sum_while to compute and return the sum from 0 to n , given a non-negative
integer n as its parameter. Its computation should use the while loop statement.
Task 44: Declare sum_for Function
In alg.h , declare a function sum_for to compute and return the sum from 0 to n , given a non-negative
integer n as its parameter. Its computation should use the for loop statement. Some loop variable should
be declared within the parentheses, a feature not allowed for C.
Task 45: Declare sum_range_for Function
In alg.h , declare a function sum_range_for to compute and return the sum from 0 to n , given a non negative integer n as its parameter. Its computation should use the range-based for loop statement.
Task 46: Declare sum_do_while Function
In alg.h , declare a function sum_do_while to compute and return the sum from 0 to n , given a non negative integer n as its parameter. Its computation should use the do-while loop statement.
Task 47: Declare sum_tail_rec Function
In alg.h , declare a function sum_tail_rec to compute and return the sum from 0 to n , given a non negative integer n as its parameter. Its computation should be based on tail-recursion.
[hint]: Some helpful function can be declared for tail-recursion, which may require more parameters.
/*----------------- alg.cpp ----------------*/
Task 48: Define season Function
In alg.cpp , define the function season , which is declared in alg.h . The switch statement should be
used.
Task 49: Define grade Function
In alg.cpp , define the function grade , which is declared in alg.h . The if statements with else parts
should be used.
Task 50: Define fib_mem Function
In alg.cpp , define the function fib_mem , which is declared in alg.h .
[hint]: This function should be recursive.
Task 51: Define vector_max Specialization
In alg.cpp , define the explicit specialization function vector_max , for dealing with a vector of Data .
Task 52: Define sum_rec Function
In alg.cpp , define the function sum_rec .
Task 53: Define sum_while Function
In alg.cpp , define the function sum_while .
Task 54: Define sum_for Function
In alg.cpp , define the function sum_for .
Task 55: Define sum_range_for Function
In alg.cpp , define the function sum_range_for .
Task 56: Define sum_tail_rec Function
In alg.cpp , define the function sum_tail_rec .
/* ----------- calendar.cpp ----------- */
Task 57: Define firstDay Variable
In calendar.cpp , define a const variable, firstDay , whose type is Weekday , value is WED . It means Jan 1,
2025, is Wednesday.
Task 58: Define monthDays Array
In calendar.cpp , define a const array of 12 int called monthDays . It records the 12 integers for the
number of days in the 12 months in 2025.
Task 59: Define eventList Variable
In calendar.cpp , define a variable eventList , which is a linked list (declared in list.h ) of Event s.
Initially, it is empty.
Task 60: Define read_events_from_file_to_list Function
In calendar.cpp , define the function read_events_from_file_to_list , which is declared in calendar.h .
Task 61: Define write_events_from_list_to_file Function
In calendar.cpp , define the function write_events_from_list_to_file , which is declared in
calendar.h .
Task 62: Define input_event Function
In calendar.cpp , define the function input_event , which is declared in calendar.h .
Task 63: Define print_event Function
In calendar.cpp , define the function print_event , which is declared in calendar.h .
Task 64: Define print_month Function
In calendar.cpp , define the function print_month , which is declared in calendar.h .
Task 65: Define show_menu Function
In calendar.cpp , define the function show_menu , which is declared in calendar.h .
Task 66: Define run_calendar Function
In calendar.cpp , define the function run_calendar , which is declared in calendar.h .
/* ----------- data.cpp ------------- */
Task 67: Include Header Files
31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
In data.cpp , include the needed header files, such as data.h .
Task 68: Define Names in Namespaces FIE and SCSE
In data.cpp , define all the names that are declared in the two namespaces FIE and SCSE .
The url in FIE records the string https://www.must.edu.mo/fie .
The url in SCSE records the string https://www.must.edu.mo/scse .
/* ---------- list.cpp ------------- */
Task 69: Define add_list_node Function
In list.cpp , define the function add_list_node , which is declared in list.h .
Task 70: Define delete_list Function
In list.cpp , define the function delete_list , which is declared in list.h .
Task 71: Define print_list Function
In list.cpp , define the function print_list , which is declared in list.h .
/* ------------ io.cpp ---------- */
Task 72: Define clear_input_queue Function
In io.cpp , define the function clear_input_queue , which is declared in io.h .
Task 73: Define get_menu_choice Function
In io.cpp , define the function get_menu_c