Click here to Skip to main content
15,922,407 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Whoops Pin
Terry O'Nolley12-Jul-03 3:58
Terry O'Nolley12-Jul-03 3:58 
GeneralRe: what function will convert a char to its number value Pin
johnstonsk11-Jul-03 10:26
johnstonsk11-Jul-03 10:26 
GeneralRe: what function will convert a char to its number value Pin
John R. Shaw14-Jul-03 7:23
John R. Shaw14-Jul-03 7:23 
AnswerRe: what function will convert a char to its number value Pin
Mike Dimmick11-Jul-03 9:47
Mike Dimmick11-Jul-03 9:47 
GeneralRe: what function will convert a char to its number value Pin
Daniel Turini11-Jul-03 10:15
Daniel Turini11-Jul-03 10:15 
GeneralRe: what function will convert a char to its number value Pin
Mike Dimmick11-Jul-03 12:19
Mike Dimmick11-Jul-03 12:19 
GeneralRe: what function will convert a char to its number value Pin
Daniel Turini11-Jul-03 23:48
Daniel Turini11-Jul-03 23:48 
GeneralRe: what function will convert a char to its number value Pin
Mike Dimmick12-Jul-03 1:16
Mike Dimmick12-Jul-03 1:16 
Generally I'd agree, but in the case where you'd basically need an object for each 'arm' of the switch statement which you wouldn't use anywhere else, it's wasteful of programming time. The virtual method case is generally more maintainable, sure.

Of course you may well need some kind of factory method or object to create the objects, so you're either back to the switch statement again, or some other kind of creation table.

Languages with reflection can of course use the name of the class in order to create one; the advantage that MFC's Run-time Class Information has over the C++ language's standard RTTI is that you can (if your class uses DECLARE_DYNCREATE or DECLARE_SERIAL) perform dynamic creation through the RUNTIME_CLASS macro.

--
Mike Dimmick
AnswerRe: what function will convert a char to its number value Pin
drabudawood13-Jul-03 20:12
drabudawood13-Jul-03 20:12 
QuestionWhy is the constructor protected ? Pin
Shay Harel11-Jul-03 7:25
Shay Harel11-Jul-03 7:25 
AnswerRe: Why is the constructor protected ? Pin
John M. Drescher11-Jul-03 7:40
John M. Drescher11-Jul-03 7:40 
GeneralRe: Why is the constructor protected ? Pin
Shay Harel11-Jul-03 7:43
Shay Harel11-Jul-03 7:43 
GeneralRe: Why is the constructor protected ? Pin
John M. Drescher11-Jul-03 7:50
John M. Drescher11-Jul-03 7:50 
GeneralRe: Why is the constructor protected ? Pin
Shay Harel11-Jul-03 7:52
Shay Harel11-Jul-03 7:52 
GeneralRe: Why is the constructor protected ? Pin
John M. Drescher11-Jul-03 7:55
John M. Drescher11-Jul-03 7:55 
GeneralRe: Why is the constructor protected ? Pin
Anthony_Yio15-Jul-03 1:27
Anthony_Yio15-Jul-03 1:27 
QuestionI don’t’ know how I can find the character set like it? Pin
Alice8011-Jul-03 7:20
Alice8011-Jul-03 7:20 
AnswerRe: I don’t’ know how I can find the character set like it? Pin
Mike Dimmick11-Jul-03 10:02
Mike Dimmick11-Jul-03 10:02 
GeneralRe: I don’t’ know how I can find the character set like it? Pin
Alice8012-Jul-03 1:54
Alice8012-Jul-03 1:54 
GeneralRe: I don’t’ know how I can find the character set like it? Pin
Mike Dimmick12-Jul-03 2:12
Mike Dimmick12-Jul-03 2:12 
AnswerRe: I don’t’ know how I can find the character set like it? Pin
Anthony_Yio15-Jul-03 1:33
Anthony_Yio15-Jul-03 1:33 
GeneralLinked list Pin
DaveE9th11-Jul-03 6:57
DaveE9th11-Jul-03 6:57 
GeneralRe: Linked list Pin
David Crow11-Jul-03 7:06
David Crow11-Jul-03 7:06 
GeneralRe: Linked list Pin
DaveE9th12-Jul-03 2:24
DaveE9th12-Jul-03 2:24 
GeneralRe: Linked list Pin
John M. Drescher11-Jul-03 7:20
John M. Drescher11-Jul-03 7:20 

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.