There will be ambiguity with your class and std::vector since you are using namespace std.
struct vector
{
double x;
double y;
friend ostream& operator<< (ostream&, vector);
}; If you still want to grab the whole namespace, I think you can disambiguate like this.
friend ostream& operator<< (ostream&, ::vector);
Reputation Points: 2780
Solved Threads: 312
long time no c
Offline 4,790 posts
since Apr 2004