



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Various topics in C++ programming, including the use of unsigned integers instead of signed integers, creating new data types like char and bool, writing functions with different return types, pointer arithmetic, and building a binary search tree. It also touches upon the differences between variables created in a function and on the heap, and the concept of namespaces.
Typology: Exercises
1 / 6
This page cannot be seen from the preview
Don't miss anything!




Try to work through the exercises on each lesson before moving onto the next. You may find the following web resource helpful:
Provides tutorials, a user’s forum and documentation on the most widely used libraries including strings, I/O and the STL.
1 struct node { 2 int value ; 3 struct node * left ; 4 struct node * right ; 5 }; 6 7 struct node * root = NULL ; 8 9 // implement the functions described by these headers 10 void insert_integer( struct node ** tree , int value ); 11 void print_tree( struct node * tree ); 12 void terminate_tree( struct node * tree ); 13
through the array decrementing the hit point value of each reference; use a single function for decrementing which accepts a “Enemy” reference as its argument.
Create a new Binary Search Tree class which stores “Comparable” objects rather than integers. Create some comparable objects and test your new Binary Search Tree class.