To get started with C++

D

dalbert169

Hi folks........
I want to learn C++,I already know C Language,will that help me.I
require it for my job,How many days will it take to learn?

==========
daniel

<a href="http://www.widecircles.com">Link Building</a>
 
A

a_linux_user

http://www.icce.rug.nl/docs/cplusplus/

I like the above site a lot. Especially for someone trying to make a
transition from C to C++, it is quite nice.

Another nice site is http://users.ece.utexas.edu/~adnan/C++/

Both these are ad-free sites, with just pure good quality free
content. I am thankful to the authors of the documents.

BUT, as others have pointed out: one has to practice a lot. I am
trying to make a transition from "C with classes" to C++. It is
gradual, but to begin with these are some things I try to do: use STL
when possible, use references, learn to use const when possible, try
to avoid pointer arithmetic, use the library facilities when you can
rather than reinventing the wheel (that is not quite circular) ...
Sometimes my first version of a program looks a lot like C (and a bit
dirty, although this is not to say C is dirty), but then I make an
effort to clean it up, and simplify it, and often I notice that using
some C++ features, I can simplify the code, make it more readable,
safer, ... I am no expert, so I welcome some experts to comment on
what I have suggested above.
 
H

Hendrik Schober

Hi folks........
I want to learn C++,I already know C Language,will that help me.I
require it for my job,How many days will it take to learn?

Opinions whether a knowledge of C helps learning C++ vary.
I'm in the it-hinders camp. Using C++ as a better C means
missing a huge percentage of its most powerful feature set.
I second the recommendation of "Accelerated C++" by Koenig
and Moo. It's excellent, although it has quite a steep
learning curve. The 2nd edition of Meyers' "Effective C++"
was aimed at former C programmers (the current, 3rd, is
more aimed at converts coming from other languages) and is
a very good 2nd C++ book to read.
Expect to need years, not days, weeks, or months, to become
a good professional C++ programmer. Expect to need weeks or
even months, not days, to become a C++ novice.
Subscribe to some beginner's forum and ask early and often.
There's nothing like discussing your ideas to find out that,
why, and where they're wrong.

HTH,

Schobi
 
J

James Kanze

(e-mail address removed) wrote:
Opinions whether a knowledge of C helps learning C++ vary.

There are some ways it certainly helps. If you know C, then you
already know how to use an editor to create source code, and
invoke a compiler to compile and link a program. You also have
a grasp of some important basics, like lexical blocks. You know
what a loop is, and what a conditional statement is, and a
function. And if you're not in an English speaking country,
you've managed to figure out how to enter things like { or |
with your keyboard.

Judging from some of the questions we see here, those are
already significant steps. If you know neither C nor C++, and
the goal is to learn C++, then going through C will only take
more time, since you'll have to learn a lot of things which are
irrelevant, or even which should be avoided in C++. But if you
already know C, for whatever reasons, and realize the limits of
applying your knowledge of it to C++, then it can certainly
help.
 
H

Hendrik Schober

James said:
Opinions whether a knowledge of C helps learning C++ vary.

There are some ways it certainly helps. [...]

I know and I agree with your examples.
I was applying my statement to the overall-helpfulness.
I have been teaching C++ and IME those who already know
C (or Java, FTM) need to unlearn a lot of things which
are considered bad habits in C++. Usually, this greatly
outweighed the advantages.
But that's just my opinion, others may have different
ones.

Schobi
 
R

Rashad

you must do small projects in c++ , you create existing applications
in your own way.
you can find a better gui tookit on www.fox-toolkit.org www.fox-tookit.net

c++ is not a better C
it has its own existence. do never follow C coding in C++ . understand
c++ concepts and write
c++ code which includes more than 80% of c++ features.

c++ annotation whic is available free of charge on debian linux OS
will be a good guide

using gnu c++ compiler / other standard comipler
 
S

sean_in_raleigh

Hi folks........
I want to learn C++,I already know C Language,will that help me.I
require it for my job,
How many days will it take to learn?

I agree with others that it will take *years*
to become a good C++ programmer, but that's
true of any other language as well. It's
just truer for C++ since the language is
so incredibly deep, with so many non-obvious
interactions among the various features.

I would suggest reading the books recommended
above, and for help I recommend the Wikipedia
Computing Reference Desk:

http://en.wikipedia.org/wiki/Wikipedia:Reference_desk/Computing

A number of professional C++ programmers hang
out there, and the desk is focused on giving
good answers to what the questioner probably
meant, rather than comp.lang.c++'s strength
in pointing out the various flaws in question,
grammar, and choice of newsgroup in which to
post.

Sean
 
J

James Kanze

James said:
Opinions whether a knowledge of C helps learning C++ vary.
There are some ways it certainly helps. [...]
I know and I agree with your examples.
I was applying my statement to the overall-helpfulness.
I have been teaching C++ and IME those who already know
C (or Java, FTM) need to unlearn a lot of things which
are considered bad habits in C++. Usually, this greatly
outweighed the advantages.
But that's just my opinion, others may have different
ones.

I think the problem is that C++ looks too much like C. Knowing
one language (should) always help in learning a second, as long
as you only apply what is applicable. The problem in this case
is that many C'isms pass the C++ compiler, and do work. But I
don't like the idea of saying "you have to unlearn them";
they're still valid C. You just have to ignore them when
learning C++. And you can still benefit from the things that do
apply (like how to enter a { or | with a European keyboard).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top