Let me rephrase again: I want to create a class "MyStreamLikeClass" which functions similarly to an ostream, so the following code would be legal:

MyStreamLikeClass stream;
stream << std::endl;

I need to define
MyStreamLikeClass &operator<< (MyStreamLikeClass &, _____);
where _____ is the appropriate type for endl.

shabbir's comment (did he me 'ostream' instead of 'outstream') is not what I want because I am not using the standard C++ streams. The argument which goes first is the stream class, which in my case would be MyStreamLikeClass.