Erle Robotics C++ GitBook

Exercises: Advaced I

Exercise 1

You have done this exercise before, but now you are ask to do this exercise usinh overloaded operators. Perform addition operation on complex data using class and object. The program should ask for real and imaginary part of two complex numbers, and display the real and imaginary parts of their sum.

Solution

Exercise 2

Define a const array and pass it to a reader () function and a modifier () function which cahnger every character for an 'O'.Analyze what happends.

Solution

Exercise 3

Define a table that can be filled with both: type integer or float. Use templates.

Solution