Hive Helsinki (School 42) 12th curriculum project (Rank04)
About · Modules · Requirements · Instructions
The repository contains several modules consisting of different exercises related to the basics of C++ programming.
CPP00
- ex00:
- familiarizes with basic C++ concepts such as string class, related functions and cout.
- ex01:
- introduces classes initialization, cin object of isstream class and further string manipulation and formatting possibilities such as .substr(), .setw(), and .length(). Additionally try / catch statements are used.
- Sets up a phone book by initialising a class 'PhoneBook', containing 8 classes of contacts
- user has options between the 3 commands
ADD
,SEARCH
andEXIT
which respectively adds contacts (and their details), searches for contacts (first displays entire list of contacts, then by entering index shows contact details) or exits the phone book - in case of invalid input, errors are displayed to the user
CPP01
- ex00:
- introduces new for allocating memory for a class
- learning about initialising classes on heap vs. stack
- ex01:
- learning about array of classes using new for memory allocation
- ex02:
- introduces concept of references
- ex03:
- reference vs. pointer to a class
- object which contains pointer to a class can be initialised without explicitly assigning value to the class whereby reference requires the object of the class not to be empty
- ex04:
- introduces concepts of ifstream and ofstream
- further string manipulation such as .find(), .erase(), .insert()
- user can give 3 arguments to the program (file name, string1 and string2), the content of the file given to the program is copied into another created file and then the sequence of string2 replaces sequence of string1 (if existing), prints errors in case of invalid arguments
- ex05:
- introduces concept of function pointers in C++
- ex06:
- introduces concept of switch statements
CPP02
-c++
compiler
To compile the executables of the different exercises, cd into the exercise folder in question and run:
$ make
To delete all files generated with make, run:
$ make fclean