I put a brace at the while loop and took out the int at keep_window_open();
but I have this error at 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]