Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Exercise: call the add function for two points

  • Create a struct representing a point: two attibutes x and y holding u32 both.
  • Call the add function passing two points to it.
  • The result needs to be a new Point that has x1 + x2 and y1 + y2 as coordinates.