overloading output operator

Hey guys. I've been hunting around the forums and tutorials, but I can't seem to understand the error I'm getting. I'm trying to overload operator<<, but I get an error saying 'ostream' does not name a type. Am I forgetting to declare something else?

ostream& operator<< (ostream& out, Struct &b);

I made sure to #include <iostream> too.
Last edited on
Topic archived. No new replies allowed.