Learn to Program with ZedLX

Free Online Programming Course for Beginners

Types point2D and colorA [5/8]

The function trianglep draws a triangle, where the vertices are given by the first three arguments, of type point2D.

The fourth argument of function trianglep is of type colorA. This argument is optional.

The signature of this function is:

  • void trianglep(
    • point2D p1,
    • point2D p2,
    • point2D p3,
    • colorA cl (optional)
    • )

The keyword void indicates that the function does not return a value.

The parameter cl can be ommitted.

Loading...