Click here to Skip to main content
15,888,579 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: STL problem Pin
BeerBelly17-Aug-04 19:02
BeerBelly17-Aug-04 19:02 
QuestionHow to Start With C++? Pin
Dody_DK17-Aug-04 6:13
Dody_DK17-Aug-04 6:13 
AnswerRe: How to Start With C++? Pin
Watever_417-Aug-04 6:23
Watever_417-Aug-04 6:23 
AnswerRe: How to Start With C++? Pin
Maximilien17-Aug-04 6:35
Maximilien17-Aug-04 6:35 
GeneralRe: How to Start With C++? Pin
Dody_DK17-Aug-04 6:39
Dody_DK17-Aug-04 6:39 
GeneralRe: How to Start With C++? Pin
Ravi Bhavnani17-Aug-04 7:28
professionalRavi Bhavnani17-Aug-04 7:28 
AnswerRe: How to Start With C++? Pin
valikac17-Aug-04 7:36
valikac17-Aug-04 7:36 
AnswerRe: How to Start With C++? Pin
peterchen17-Aug-04 11:38
peterchen17-Aug-04 11:38 
You should consider C++ less of a "tool for writing programs", but more a "tool to make tools for writing programs": there is a lot more to learn besides the language itself.

The following is a roadmap to "Mastering C++" - hiw I would teach it. Some people might want to reorder the list which is fine with me - it all depends on the teacher and the tools.

Chapter (I) Learning the language, and how to not abuse it
a) Learn the basics language: type system, control structures, functions, scope.
b) learn concepts and tools: programming style, structuring your program using functions, the difference between contract, declaration and implementation
c) learn the language: pointers. pointer arithmetic, referencing, dereferencing, pointers vs. references, pointer to pointer, adress of pointer, allocating raw memory, etc.
c2) If you didn't succeed with (c): learn pointers
c3) if you don't get it the third time, give up. Really. I am serious.*
d) Learn debugging. This means assert, trace, using a debugger, distrusting yourself, acquiring some programming style.
e) learn the language: classes. Member functions, constructor, destructor
f) learn concepts: encapsulation, simple object design, encapsulating state
g) learn exceptions **
h) repeat concepts: good programming style, contract vs. declaration vs. implementation
i) learn concepts: inheritance, polymorphy
j) learn concepts: "enhanced" object design with the new knowledge (exceptions and polymorphy)
k) Learn some refined points of the language: const-correctness, default constructor, copy constructor vs. assignment operator, how to make a class behave like a built in type (but skip operator overloading)
l) learn the language: function templates, class templates
m) get an introduction on the STL (standard template library, which makes the biggest part of the C++ run time library)
n) ok, now, just as sugar, operator overloading, and how to make types truly act like built-ins

YES, now you are allowed to leave the console.

Chapter (II) ...but also MFC
a) refine your knowledge on the STL
b) learn some Windows API basics: Windows, Event Driven Programming, Window Handles (you can omit *creating* windows here, since this is a painful task made much easier by frameworks - but the rest is important to understand and makes working with the MFC easier). Windows Messages, GDI, standard controls etc.
c) Do the MFC "Scribble" tutorial, just following the main path (up to "printing" or so). Don't try to udnerstand everything, just get a feeling for the "flow".
d) Do the "Scribble" tutorial again, this time exploring the background explanations etc.

Chapter (II) Become a Pro
a) Notice that, once you are here, you are the löast person on earth doing MFC Wink | ;)
b) Learn enhanced concepts: Exception Safety, Patterns etc.
c) Learn "Industry Power" stuff: Automated Tests, Version Control, Finalizing, and everything that belongs to running a larger project.


Warning: this course is a pain. In the ass, in the back, in your fingers, everywhere. Yet, it's IMO one of the shorter routes to a pro. To be true, you could start with th MFC stuff pretty much after (I)-(j), but this makes you only half-a-programmer, and you might acquire some misfeats that are hard to get rid of later.

The order of the list itself clearly shows some drawbacks of the C++ language, namely, the position of exceptions, and the STL, which requires a pretty advanced understanding to not be a complete mystery even to use.


*) I pretty much agree with the thought that understanding pointers needs a certain "wiring" of the brain. All other stuff in C++ can be learned by a decently intelligent person. Pointers are different, you either get them, or you don't. If you can't do pointers, C++ will be a pain all the time.

**) that's really late, to late. They are an important tool for error handling - and people should learn it as early as possible. However, it doesn't make much sense wihtout a good grasp on scope and code flow. I would do exceptions right after (b), but books/courses don't do it without classes.


we are here to help each other get through this thing, whatever it is Vonnegut jr.

sighist || Agile Programming | doxygen

Questioncan a dll use the mfc? Pin
Anonymous17-Aug-04 6:06
Anonymous17-Aug-04 6:06 
AnswerRe: can a dll use the mfc? Pin
sojijolan17-Aug-04 6:46
susssojijolan17-Aug-04 6:46 
GeneralProgram Interface (API) Pin
sergeyv200217-Aug-04 6:04
sergeyv200217-Aug-04 6:04 
GeneralRe: Program Interface (API) Pin
palbano17-Aug-04 6:30
palbano17-Aug-04 6:30 
GeneralRe: Program Interface (API) Pin
sergeyv200217-Aug-04 7:51
sergeyv200217-Aug-04 7:51 
GeneralRe: Program Interface (API) Pin
peterchen17-Aug-04 12:26
peterchen17-Aug-04 12:26 
GeneralRe: Program Interface (API) Pin
sergeyv200218-Aug-04 3:04
sergeyv200218-Aug-04 3:04 
GeneralNot quite the right place but.... Pin
Giles17-Aug-04 5:32
Giles17-Aug-04 5:32 
GeneralRe: Not quite the right place but.... Pin
Ravi Bhavnani17-Aug-04 7:30
professionalRavi Bhavnani17-Aug-04 7:30 
GeneralRe: Not quite the right place but.... Pin
Giles17-Aug-04 8:54
Giles17-Aug-04 8:54 
Generalcomparing Visual C++, C#, VB Pin
steve_rm17-Aug-04 5:32
steve_rm17-Aug-04 5:32 
GeneralRe: comparing Visual C++, C#, VB Pin
David Crow17-Aug-04 5:42
David Crow17-Aug-04 5:42 
GeneralRe: comparing Visual C++, C#, VB Pin
Watever_417-Aug-04 6:21
Watever_417-Aug-04 6:21 
Generalnon MFC single instance Pin
ns17-Aug-04 5:31
ns17-Aug-04 5:31 
GeneralRe: non MFC single instance Pin
David Crow17-Aug-04 5:44
David Crow17-Aug-04 5:44 
GeneralRe: non MFC single instance Pin
ns17-Aug-04 5:46
ns17-Aug-04 5:46 
GeneralEdit Box read only Pin
Jay.Jay17-Aug-04 5:31
Jay.Jay17-Aug-04 5: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.