| Author |
C++ Throw question
|
|
| mindmesh 2005-07-20, 12:30 pm |
| I'm working out of a book trying to refresh myself on C++, and everytime I use one of their programs with throw I get an error that I am unable to interpret. Any ideas..
Files attached. | |
| mindmesh 2005-07-20, 12:35 pm |
| here is the header file. | |
| mindmesh 2005-07-20, 12:41 pm |
| here is the error message. | |
| dmaftei 2005-07-22, 4:09 pm |
| 1. You have a typo: 'dividionbyzero' (line 33 in the source file).
2. You need to call printmsg() on 'fe', not on 'f' (line 40 in source file).
3. You need default and copy constructors for your classes.
A suggestion: do NOT use using directives ('using namespace std'); use using declarations ('using std::cout'), or even better qualify names when you use them ('std::cout'). | |
| mindmesh 2005-07-24, 9:55 pm |
| quote: Originally posted by dmaftei
1. You have a typo: 'dividionbyzero' (line 33 in the source file).
2. You need to call printmsg() on 'fe', not on 'f' (line 40 in source file).
3. You need default and copy constructors for your classes.
A suggestion: do NOT use using directives ('using namespace std'); use using declarations ('using std::cout'), or even better qualify names when you use them ('std::cout').
The first two I am aware of and have fixed. The third one, however, I will need to look at.. Thanks for the help, dmaftei. I'll let you know how it works out.. | |
| mindmesh 2005-07-25, 4:44 pm |
| I made the changes you had suggested. I think I did them correctly but here they are if you want to take a look. | |
| mindmesh 2005-07-25, 4:46 pm |
| here is the cpp file. | |
| dmaftei 2005-07-25, 5:00 pm |
| Does it compile? What compiler do you use? | |
| Sexy Lexy 2005-07-25, 8:06 pm |
| The dmaftei retarded compiler, it doesn't do what it should and cries like a b1tch with a skinned knee when it doesn't get it's way.
Oops, sorry.
 | |
| dmaftei 2005-07-26, 12:18 am |
| quote: Originally posted by Sexy Lexy
The dmaftei retarded compiler, it doesn't do what it should and cries like a b1tch with a skinned knee when it doesn't get it's way.
Oops, sorry.
?? | |
| dmaftei 2005-07-28, 6:43 am |
| quote: Originally posted by mindmesh
here is the cpp file.
Feel free to PM me if you need more help; with Lexy around it will be hard to discuss. | |
| dmaftei 2005-07-28, 6:45 am |
| quote: Originally posted by Sexy Lexy
The dmaftei retarded compiler, it doesn't do what it should and cries like a b1tch with a skinned knee when it doesn't get it's way.
Oops, sorry.
What the hell is the matter with you Lexy, are you drunk or something?! | |
| Farrell 2005-08-04, 5:58 am |
| quote: Originally posted by Sexy Lexy
The dmaftei retarded compiler, it doesn't do what it should and cries like a b1tch with a skinned knee when it doesn't get it's way.
Oops, sorry.
Esxcuse me but what was that all about? D was offering to help here by asking some relevant questions and you give a vague nonsensical attack on hinm? |
|
|
|