Click here to Skip to main content
16,019,614 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: exceptions Pin
Zac Howland22-Aug-06 9:22
Zac Howland22-Aug-06 9:22 
QuestionRe: exceptions Pin
David Crow22-Aug-06 9:32
David Crow22-Aug-06 9:32 
AnswerRe: exceptions Pin
Zac Howland22-Aug-06 9:42
Zac Howland22-Aug-06 9:42 
GeneralRe: exceptions Pin
David Crow22-Aug-06 9:47
David Crow22-Aug-06 9:47 
GeneralRe: exceptions Pin
Zac Howland22-Aug-06 10:08
Zac Howland22-Aug-06 10:08 
GeneralRe: exceptions Pin
David Crow22-Aug-06 10:25
David Crow22-Aug-06 10:25 
GeneralRe: exceptions Pin
Zac Howland22-Aug-06 13:34
Zac Howland22-Aug-06 13:34 
AnswerRe: exceptions Pin
Zac Howland22-Aug-06 9:09
Zac Howland22-Aug-06 9:09 
jon_80 wrote:
bool readFile(char strFileToRead[MAX_SENTENCE_LENGTH + 1]) throw (CSentenceAr);


Microsoft's compiler doesn't distinguish between a specificed throw and a generic one. That is, what you have is equivalent to writing:

bool readFile(char strFileToRead[MAX_SENTENCE_LENTH + 1]) throw (...);

As a side note, you should NOT use the same class you are throwing from as the exception type you are throwing. It would then be possible to end up with an infinite throw problem -- which is very very bad.

Unless you have to define your own exception class for an assignment, you should use the standard exception class, or use MFC's CException class.

If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac

GeneralRe: exceptions Pin
Cedric Moonen22-Aug-06 9:23
Cedric Moonen22-Aug-06 9:23 
GeneralRe: exceptions Pin
Zac Howland22-Aug-06 9:46
Zac Howland22-Aug-06 9:46 
AnswerRe: exceptions Pin
jon-8022-Aug-06 9:38
professionaljon-8022-Aug-06 9:38 
GeneralRe: exceptions Pin
Zac Howland22-Aug-06 9:52
Zac Howland22-Aug-06 9:52 
AnswerRe: exceptions Pin
markkuk22-Aug-06 11:22
markkuk22-Aug-06 11:22 
QuestionRe: exceptions Pin
jon-8023-Aug-06 4:50
professionaljon-8023-Aug-06 4:50 
QuestionHide window Pin
Manjunath S22-Aug-06 8:46
Manjunath S22-Aug-06 8:46 
AnswerRe: Hide window Pin
Jun Du22-Aug-06 9:39
Jun Du22-Aug-06 9:39 
AnswerRe: Hide window Pin
eusto22-Aug-06 9:44
eusto22-Aug-06 9:44 
QuestionError: Run-Time Check Failure #2 - Stack around the variable 'password' was corrupted. Pin
jon-8022-Aug-06 7:59
professionaljon-8022-Aug-06 7:59 
AnswerRe: Error: Run-Time Check Failure #2 - Stack around the variable 'password' was corrupted. Pin
Cedric Moonen22-Aug-06 8:23
Cedric Moonen22-Aug-06 8:23 
GeneralRe: Error: Run-Time Check Failure #2 - Stack around the variable 'password' was corrupted. Pin
jon-8022-Aug-06 8:42
professionaljon-8022-Aug-06 8:42 
GeneralRe: Error: Run-Time Check Failure #2 - Stack around the variable 'password' was corrupted. Pin
Cedric Moonen22-Aug-06 8:48
Cedric Moonen22-Aug-06 8:48 
GeneralRe: Error: Run-Time Check Failure #2 - Stack around the variable 'password' was corrupted. Pin
jon-8022-Aug-06 8:58
professionaljon-8022-Aug-06 8:58 
GeneralRe: Error: Run-Time Check Failure #2 - Stack around the variable 'password' was corrupted. Pin
Zac Howland22-Aug-06 9:25
Zac Howland22-Aug-06 9:25 
AnswerRe: Error: Run-Time Check Failure #2 - Stack around the variable 'password' was corrupted. Pin
Zac Howland22-Aug-06 9:38
Zac Howland22-Aug-06 9:38 
QuestionRadio Power Button Pin
siddhen22-Aug-06 7:31
siddhen22-Aug-06 7:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.