Click here to Skip to main content
15,881,898 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've been self learning C++ for over a month now. I know it would take years before I can be 'skilled' in C++. But currently I am overwhelmed by it. I still haven't grasps the basics. There's just too many to learn.

I've read somewhere that C is simpler (to learn). Should I familiarize myself with the basic of C first?
Posted
Comments
RedDk 5-Sep-15 14:21pm    
Visual Studio C++ (C#, VB.NET, etc ...) managed and unmanaged flavors included (.NET/other) opens the door to MSDN online samples. If you don't know where to buy hardcopy, or if bookstores that sell computer programming books are not in your area, downloading and studying these samples is the logical course of developing your skills.

Stick with C++. You'll run across C samples elsewhere. At which point you might be challenged by the idea of converting to C++ or C#. One word: template template template ...
Are Riff 5-Sep-15 14:37pm    
Does 'template' means reading others sample code?
I practice coding using Visual Studio 2015.
What do you mean by managed and unmanaged?
Sergey Alexandrovich Kryukov 5-Sep-15 22:42pm    
No, your idea of template has nothing to do with reality. Read. Read!
"Managed" in this context, mean not instruction-set code, but CIL code for CLI (in such CLR as .NET), used during run-time via JIT. Read on all of these abbreviations (for example, in Wikipedia) — this is not the good place for explaining it all, and most of the CodeProject members do have some idea on the topic. Read!
—SA
Are Riff 6-Sep-15 2:25am    
Thanks, I've begun reading a thousand pages book on C++. I guess I've haven't reach the part yet.
RedDk 7-Sep-15 13:19pm    
Better question "why convert?". As you can see beneath here, posting Q in CP QA will result in a lot of opinionated bolderdash from cpians who have nothing better to do than waste you time with their version of belabored english. This esoteric rhodomontade is to be ignored.

Forget about "template". Go get Barne Stroustrup's "The C++ Programming Language".

C++ is a superset of C, so about any C program will be compiled by a C++ compiler.
I don't recommend C or C++ to beginners even if they are popular. Managed languages (like VB, C#, Python, Java, JS, ...) are a much better choice for beginners because you can focus on what you want to do.

My advice:
- Master Boole algebra, that's what rules every condition in a program. Boole algebra is not very complicated but it is mandatory.
- Master one or more Analyse methods, i recommend E.W. Dijkstra Top-Down method. This method helps you to organise the problem in a fashion aimed to programming.
- Find tutorials to get started on a subject. Don't hesitate to follow more than one tutorial.

The most important thing is to master methods to analyse problems, after that, it is simply a matter of translating the analyse in a language.
 
Share this answer
 
v6
Comments
Sergey Alexandrovich Kryukov 5-Sep-15 22:03pm    
I think, this is too narrow and highly subjective selection of topics. "The language don't really matter" is a big exaggeration; even though there is a grain of sense in this saying: there is something behind the language which can be more important. But it does not mean that the language does not matter; it's really important.

Anyway, please see my answer.

—SA
Patrice T 6-Sep-15 2:45am    
"Narrow" ? Ok I admit.
Every time you encounter a complicated "if ... elseif ..." sequence, you need Boole algebra to understand the logic behind.
If you don't know how to transform a problem in a fashion that can be programmed, mastering a language may not help much.
Sergey Alexandrovich Kryukov 6-Sep-15 9:54am    
If you say that without understanding Boolean algebra its impossible to do any reasonable programming, I'll readily agree. It's just not enough, by far... :-)
—SA
I can give you one advice which many may consider very weird (risking some down-voted on my answer): Do not learn C++ and do not learn C, learn something reasonable at first. Later on, you will have to get well familiar with C++, of course, and may be with C.

I saw too many developers who benefited a lot from not learning C/C++ at first, and many developers who suffered from learning C/C++. The problem here is imprinting. The slackness of these languages can heart inexperience brains and stimulate formation of bad habits.

Even though C++11 is very modern, C and even C++ are enormously archaic at heart. Worse, they have been created as "anti-theoretical", careless, designed without understanding that fast writing is less important than readability, and so on. Further history of language development was, in big part of it, the history of overcoming of the inherent problems of the languages, which is not the best from the learner's standpoint. Many C++ addicts pointed out efficiency of the compiled code, but this is not because of the quality of the language, but merely due to much more effort put in compiler implementation. Inherently, there are no a single language feature promoting efficiency, compared to other language compiled to native instruction-set code.

One point which even the proponents of C or C++ often agree with is: this is not the best for beginners. Even assembly language makes more sense, because it helps to learn the CPU operation principles. Better choice for a beginner? Many: Pascal (especially Object Pascal, which can be used with cross-platform Free Pascal), C#, Java, Python, to name just the few of the most popular. (And to yourself a big favor, not Basic, not even VB.NET, at least not at the beginning.)

You should better read these pages criticizing C++, for better understanding:
C++ is Good for the Economy, It Creates Jobs!,
Defective C++.

Now, the main idea, most practically important: don't hope to learn just one language, get ready to learn several one. Learning just one narrows down our vision, dangerous for personal development. :-)

And, finally: the choice is yours. :-)

—SA
P.S.: I really hope for not having flame wars here.
 
Share this answer
 
v2
Comments
Patrice T 6-Sep-15 2:27am    
Agreeing with you. I consider C as "Write Only" language.
Sergey Alexandrovich Kryukov 6-Sep-15 9:40am    
Thank you. This is some exaggeration, but the expression is great.
—SA
Are Riff 6-Sep-15 2:53am    
I agree that C++ is a tool of programming in general.
I also agree that I need to learn few programming language. Before C++, I learned Python for about a month.

The reason why I brought up the question is because I got stuck.
In my case, I stuck understanding the basic of:
1. User define type (class)
2. Function overloading
3. Pointers
Which really slow me down to the point that I stuck. These are very important to allow me to advance a little bit more in learning C++.
Sergey Alexandrovich Kryukov 6-Sep-15 9:39am    
Well, we rarely discuss and domain-oriented languages here, only universal ones. It's nearly any language we ever mention. So, there is no special about C++ in this aspect, too.

But not I can see your points: they are not about just the language, but about fundamental programming constant. I cannot just tell that you should learn them well and perfectly understand them, because you should learn a lot more (which could get your stuck even more).

1) Class is not the only user-defined type. First, you should perfectly understand types vs instances. Now, there are so many "developers" (that is, people writing some code) using "class" a lot and having no clue of OOP. This is no good. This is only prerequisites to OOP. Other prerequisites are inheritance and encapsulation, and so on, but the heart is virtual function, overloading and late binding (all related to dynamic dispatch), and one important application of it is polymorphism. Without all that, class/struct is

2. This is just nothing. Bad, confusing term, with almost no semantic behind. It's just then different functions are allowed to get the same names.
The key in OOP is overriding. Perhaps you confuse the two, as many other beginners confused by this terminology.

3. Pointers are the base of bases, something that you either get or not. Could be learned in its managed meaning, as references. If you don't master them perfectly, forget about programming...

—SA
[no name] 6-Sep-15 6:43am    
My 5, even I do not agree with some of your arguments.

From my point if view the language is not the sticking point, it is only the tool. Much more important - I think - is the way of analyzing and abstracting a problem. So I would go first to learn something like UML.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900