![]() |
strange error in stack program : try and catch statement
Hi
I am getting very strange error in stack program when I am compiling it Stack.cpp:45: error: expected unqualified-id before "try" Stack.cpp:51: error: expected unqualified-id before "catch" Stack.cpp:58: error: expected unqualified-id before "catch" can anyone resolve it here's my code Code:
StackType::StackType() |
Re: strange error in stack program : try and catch statement
Your try...catch block should be in a function, but it isn't. Is it meant to be within the StackType:ush function?
Are the functions meant to be called ush and op, r id ou ean o iss ff he irst etter? |
Re: strange error in stack program : try and catch statement
Yes, your try...catch block cannot be a stand alone stuff... It should be within a function...
|
| All times are GMT +5.5. The time now is 02:54. |