BroVic / week12_point_exercise

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Week 12 structs exercise

Exercise 1

  • The starter code contains the point struct from last week, and an implementation of operator==

  • Tasks:

    • Implement operator!=

    • Implement (binary) operator+ and operator-

    • Implement operator+= and operator-=. What type should these functions return? (Think: do as the ints do!)

    • (Harder) Implement operator<< for output streams

    • Test all your operator overloads in your main() routine

About


Languages

Language:C++ 78.6%Language:CMake 21.4%