Overloading the output operator

Okay, so I'm almost done with my program, but I'm stuck on overloading the output operator. When I look it up, I'm confused as to the format I should be using for everything. I'm using it with a throttle class, and I want to print out the number of throttle positions by overloading the output operator. Can somebody point me in the right direction?

What should my prototype and my function call look like?

Thanks, guys.
Something like:

std::ostream& operator <<(std::ostream& out, const YourObject& obj);

You'll want to declare it as a friend in your class though so you can access your private data members.
Aha! The friend part went totally over my head in the lecture, so of course I would need that here. Okay. And here I've been just going over and over my function/calls. I'll see if I can figure that out, thanks firedraco.
Topic archived. No new replies allowed.