C "enhanced, enhanced"
- We have to use C++98 and compile with the
-std=c++98
flag (be careful, the macOSc++
compiler sometimes doesn't warns you if you're using newer features, so make sure to compile on Linux to be safe) - No norm 🥳
- Class names must be in UpperCamelCase format. Files containing class code will always be named according to the class name.
- You are allowed to use almost everything from the standard library. Thus, instead of sticking to what you already know, it would be smart to use as much as possible the C++-ish versions of the C functions you are used to.
- Forbidden:
Boost
libraries,*printf()
,*alloc()
,free()
,using namespace <ns_name>
(butusing <namespace>::<class>
is allowed),friend
keyword - Containers and Algorithms (
<algorithm>
header) are only allowed in Module 08 and 09 - Avoid memory leaks
- From Module 02 to 09, your classes must be designed in the Orthodox Canonical Form, except when explicitely stated otherwise
- No function implementation in a header file
- Headers must have include guards
Namespaces, classes, member functions, stdio streams, initialization lists, static, const, and some other basic stuff
Exercise | Desription | Learnings |
---|---|---|
00: Megaphone |
|
|
01: My Awesome PhoneBook |
|
|
02: The Job Of Your Dreams |
|
|
Memory allocation, pointers to members, references, switch statement
Exercise | Desription | Learnings |
---|---|---|
00: BraiiiiiiinnnzzzZ |
|
|
01: Moar brainz! |
|
|
02: HI THIS IS BRAIN |
|
|
03: Unnecessary violence |
|
|
04: Sed is for losers |
|
|
05: Harl 2.0 |
|
|
06: Harl filter |
|
|
Ad-hoc polymorphism, operator overloading and Orthodox Canonical class form
Exercise | Desription | Learnings |
---|---|---|
00: My First Class in Orthodox Canonical Form |
|
|
01: Towards a more useful fixed-point number class |
|
|
02: Now we’re talking |
|
|
03: BSP |
|
|
Inheritance
Exercise | Desription | Learnings |
---|---|---|
00: Aaaaand... OPEN! |
|
|
01: Serena, my love! |
|
|
02: Repetitive work |
|
|
03: Now it’s weird! |
|
|
Subtype polymorphism, abstract classes, interfaces
Exercise | Desription | Learnings |
---|---|---|
00: Polymorphism |
|
|
01: I don’t want to set the world on fire |
|
|
02: Abstract class |
|
|
03: Interface & recap |
|
|
Repetition and Exceptions
Exercise | Desription | Learnings |
---|---|---|
00: Mommy, when I grow up, I want to be a bureaucrat! |
|
|
01: Form up, maggots! |
|
|
02: No, you need form 28B, not 28C... |
|
|
03: At least this beats coffee-making |
|
C++ casts
Exercise | Desription | Learnings |
---|---|---|
00: Conversion of scalar types |
|
|
01: Serialization |
|
|
02: Identify real type |
|
|
C++ templates
Exercise | Desription | Learnings |
---|---|---|
00: Start with a few functions |
|
|
01: Iter |
|
|
02: Array |
|
|
Templated containers, iterators, algorithms
Exercise | Desription | Learnings |
---|---|---|
00: Easy find |
|
|
01: Span |
|
|
02: Mutated abomination |
|
|
STL
Exercise | Desription | Learnings |
---|---|---|
00: Bitcoin Exchange |
|
|
01: Reverse Polish Notation |
|
|
02: PmergeMe |
|
|
Made it! 🥵