Link to home
Start Free TrialLog in
Avatar of burny
burny

asked on

learn c++

how would i go about leaning c++ when i know very little about programming languages.  i want to learn and go to school after i get a basic ground of the language.
Avatar of nietod
nietod

I would not recommend C++ for beginners.  There are some C++ books that are for beginners, but I really don't think it is a good idea.

I would start with Pascal or Visual basic at least until you have the basic principles of programiming down..  In the long run, you are likely to learn faster and end up a better programmer in the end
Try programming Pascal, or get a good book on C....
Actually, I would not recommend C over C++.  It has the same flaws.  They are jokinly described as "providing the programmer with enough rope to shoot himself in the foot" (For our international experts,  That's a mixed up mess of two english idioms.)  The point is that C and C++ have wonderful flexibility that is a great benefit to experienced programmers, but that is a great detriment to beginners.  C has such a fleixble syntax that a novice can make many mistakes that will compile and run but will do something that the programmer did not intend.  Simpler languages, like Pascal have a much simpler syntax that is much more likely to detect errors.
ASKER CERTIFIED SOLUTION
Avatar of TheGrinch
TheGrinch

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I know Pascal somewhat well, and I'm beginner in C++, but I think even though C++ is difficult ot learn it is the best language there is... Sometimes, when programming in Windows, VC++ is not the best way to go.. There are also nice tools as Delphi, but the problem is that it doesn't allow you to do whatever you want with the system.... It usually detects the smallest error, like if you miss a semicilon in specific places...

btw- I said C because it doesn't have all that OOP, ie...classes, objects, membert functions and so on.... Sometimes it's difficult for beginner to learn that... I have experience with Delphi which is an OOP Pascal for Windows, and when I stareted C++ it was quite easy for me to learn the the syntax... The definitions, and everything I know from Pascal....

Cheers,
Viktor
>> said C because it doesn't have all that OOP, ie...classes, objects, membert functions and so on....
Removing them certainly removes a lot of complexity, but those aren't the things that tend to cause the problems for students.

Common problems for students are:
1.  0 referenced arrays
2.  C's weird pointer/array semantics (not the least bit weird to experienced C/C++ programmers, but weird even to advanced programmers who haven't worked in C/C++.
3.   C's NUL terminated strings.  (If there isn't at least one  NUL terminated C string problem on this site on a particular day, then school must be out.)
4.   C's overabundance of operators.  Especialy & and | for && and ||.
5.  Preprocessor problems.  especially with header files and min and max macros.

I swear that the vast majority of beginner questions I answer are on these topics (and probalby a few more).  That is why I think C is bad for beginners.  They should focus on program design issues, not syntax and semantics.
You're right :)
There is currently (worldwide) a debate on the suitability of C++ as a first language. At some universities C++ has been introduced as a first language with success. IMHO, it depends a lot on the the individual. If you don't have problems with thinking abstractly (think of you mathematics abilities - can you easily visualize "word problems"?), then go for C++. If you problems with abstract ideas, then go for something like Pacal.