ok im stuck how do u print to the screen in the main file from a class?
this is what im doin
ostream &operator <<(ostream &outs, const Point &p)
{
outs << "(" << p.getX() << ", " << p.getY() << ")"; // print out the value of the point as (x, y)
return outs;
}
i want to print that in main.
this is my main
#include "line.cpp"
#include "point.cpp"
void main()
{
Point xVal;
Point yVal;
xVal.setPoint(4.3,5.6);
yVal.setPoint(6.8,3.9);
xVal.getX();
yVal.getY();
xVal.printPolar();
yVal.printPolar();
<<();
}
how do i call the "<<" function so it prints right i keep gettin an error on the line