View Full Version : C++ EndOfStreamException

February 21st, 2010, 05:21 PM

I am writing a program in c++ to read in characters individually. The characters are generated in another program which throws an EndOfStreamException when there are no more characters.

What do I need to #include or #using at the start of the program to use the EndOfStreamException?

I've found this website,
but I'm still not sure what to do. I'm using g++ to compile.



February 21st, 2010, 06:49 PM
HA! You got me there... I just examined the link you posted. That is for a JAVA, or possibly C#, exception class; it has nothing to do with C++.


If you have one program (application) throwing an exception, and your hoping to have another program catch it, then good luck with that, because AFAIK, it's not possible.

Could you please explain the issue you are having a little more clearly, maybe even show some code. I am not at all familiar with this EndOfStreamException. Is is "home-made"?

February 27th, 2010, 11:28 AM
Thanks for the reply.

I had a bit more look into it, but still couldn't find anything, so I ended up doing it a different way instead that avoided using the Exception. Not as neat, but it works now :).