0

I have a class called Point.

Point.h :

#ifndef POINT_H
#define POINT_H

#include "Vector.h"
#include <iostream>

class Point
{
	friend ostream& operator<<(ostream& output, const Point& p) //must have global scope
	{
		output << "x: " << x << " y: " << y;
		return output;
	}

The compiler is telling me
syntax error: Missing ';' before '&'

Am I doing something wrong?

Thanks!

Dave

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by daviddoria
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.