On Feb 17, 2008 9:58 AM, Robert Ryan <[EMAIL PROTECTED]> wrote:
> I put a brace at the while loop and took out the int at keep_window_open();
> but I have this error at catch
Your while loop is closed but your try isn't. It should be like
try {
while {
...
}
}
catch ...
> #include<iostream>
> using namespace std;
> expression();
> keep_window_open();
> int main()
> try {
> while (cin) {
> cout << expression() << '\n';
> keep_window_open();
> }
> catch (runtime_error& e) {
> cerr << e.what() << endl;
> keep_window_open();
> return 1;
> }
> catch (...) {
> cerr << "exception \n";
> keep_window_open();
> return 2;
> }
>
>
> .cpp: In function `int main()':
> .cpp:11: parse error before `catch'
>
>
> ---------------------------------
> Never miss a thing. Make Yahoo your homepage.
>
>
> [Non-text portions of this message have been removed]
>
>
>
> To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
> Yahoo! Groups Links
>
>
>
>
--
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world."
-- Jelaleddin Rumi