I just started c programming. I want to migrate to c++. I know a little
bit about class/inheritance.
I am asking for good books to read. Elementary will be good.
Thanks for any comments 17 1785
I_got_questions? wrote: I just started c programming. I want to migrate to c++. I know a little bit about class/inheritance. I am asking for good books to read. Elementary will be good.
"Accelerated C++" by Koenig & Moo.
Resist the temptation to code C++ like it's C, you'll lose a lot of it's
power. Reading that book will get you from "Hello World" to solving
problems which are much more interesting, and very little of it, if any,
looks like C.
Ben Pope
--
I'm not just a number. To many, I'm known as a string...
On 2006-01-09, I_got_questions? <un************@hotmail.com> wrote: I just started c programming. I want to migrate to c++. I know a little bit about class/inheritance. I am asking for good books to read. Elementary will be good.
The two C++ books I own and constantly referencing are:
The C++ Programming Language 3rd Ed.: Bjarne Stroustrup
The C++ Standard Library: Nicolai M. Josuttis
They are really very handy.
- Russell
"I_got_questions?" <un************@hotmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com... I just started c programming. I want to migrate to c++.
First some speculation about your motives, and some
corresponding remarks:
Does this mean you're abandoning learning C and want
to learn C++ first or instead? If so, fine. If you're wanting
to learn both simultaneously, I strongly recommend against it,
as the very similar syntax, but often very different semantics,
will probably cause confusion with both languages.
If you're wanting to use C++ knowledge as an 'extension'
to your C knowledge, This is a mistake. C and C++ are two
separate, distinct langauges.
I know a little bit about class/inheritance. I am asking for good books to read. Elementary will be good.
Thanks for any comments
Visit www.accu.org, look at the book review section,
category 'beginner's C++'.
My personal recommendation for you would be: www.acceleratedcpp.com
-Mike
Mike Wahler wrote: "I_got_questions?" <un************@hotmail.com> wrote in message news:11**********************@g47g2000cwa.googlegr oups.com...I just started c programming. I want to migrate to c++.
First some speculation about your motives, and some corresponding remarks:
Does this mean you're abandoning learning C and want to learn C++ first or instead? If so, fine. If you're wanting to learn both simultaneously, I strongly recommend against it, as the very similar syntax, but often very different semantics, will probably cause confusion with both languages.
If you're wanting to use C++ knowledge as an 'extension' to your C knowledge, This is a mistake. C and C++ are two separate, distinct langauges.
Thank you all for the suggestions. It is very helpful.
I perhaps should know more about C programming before I move to C++.
I'd recommend two books:
1) Deitel "Programming in C++"
If thats too easy, try abovementioned Stroustrup "The C++ Language",
"I_got_questions?" <un************@hotmail.com> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com... Mike Wahler wrote: "I_got_questions?" <un************@hotmail.com> wrote in message news:11**********************@g47g2000cwa.googlegr oups.com... >I just started c programming. I want to migrate to c++.
First some speculation about your motives, and some corresponding remarks:
Does this mean you're abandoning learning C and want to learn C++ first or instead? If so, fine. If you're wanting to learn both simultaneously, I strongly recommend against it, as the very similar syntax, but often very different semantics, will probably cause confusion with both languages.
If you're wanting to use C++ knowledge as an 'extension' to your C knowledge, This is a mistake. C and C++ are two separate, distinct langauges.
Thank you all for the suggestions. It is very helpful. I perhaps should know more about C programming before I move to C++.
No. This is a very common misconception. No knowledge
of one langauge is necessary in order to learn the other.
(As a matter of fact it can sometimes be a hindrance).
See this excerpt from the FAQ for 'alt.comp.lang.learn.c-c++'
(the 'learner's group): http://ma.rtij.nl/acllc-c++.FAQ.html#q2.3
Also see: http://www.parashift.com/c++-faq-lit....html#faq-28.2
and: http://public.research.att.com/~bs/learn.html
If you want to learn C, learn C.
If you want to learn C++, learn C++.
If you want to learn both, learn both. Either one first.
But trying to learn both simultaneously is imo a recipe
for insanity. :-)
Informational: C++ (especially its standard library) has
features that can protect you from many of the common
errors that are easy to make and hard to find in C.
If you read a C++ book like "Accelerated C++", imo as
a beginner you'll much more quickly write more useful
programs with less bugs than with C and a beginner's
C text.
-Mike
Mike Wahler wrote: "I_got_questions?" <un************@hotmail.com> wrote in message news:11*********************@g47g2000cwa.googlegro ups.com...
No. This is a very common misconception. No knowledge of one langauge is necessary in order to learn the other. (As a matter of fact it can sometimes be a hindrance). See this excerpt from the FAQ for 'alt.comp.lang.learn.c-c++' (the 'learner's group): http://ma.rtij.nl/acllc-c++.FAQ.html#q2.3 Also see: http://www.parashift.com/c++-faq-lit....html#faq-28.2 and: http://public.research.att.com/~bs/learn.html
If you want to learn C, learn C. If you want to learn C++, learn C++. If you want to learn both, learn both. Either one first. But trying to learn both simultaneously is imo a recipe for insanity. :-)
Informational: C++ (especially its standard library) has features that can protect you from many of the common errors that are easy to make and hard to find in C. If you read a C++ book like "Accelerated C++", imo as a beginner you'll much more quickly write more useful programs with less bugs than with C and a beginner's C text.
What he said.
Ben Pope
--
I'm not just a number. To many, I'm known as a string...
"Mike Wahler" <mk******@mkwahler.net> writes: [...] "I_got_questions?" <un************@hotmail.com> wrote in message Thank you all for the suggestions. It is very helpful. I perhaps should know more about C programming before I move to C++.
No. This is a very common misconception. No knowledge of one langauge is necessary in order to learn the other. (As a matter of fact it can sometimes be a hindrance).
Strange that anyone would say this, since the overlap between the two
is large.
I don't think it's "necessary" to learn C first, but it would probably
be optimum, since, for the most part, C is a subset of C++, and
new concepts are usually better-learned in smaller chunks rather
than larger chunks.
But far be it from me to contradict "the experts..."
--
% Randy Yates % "How's life on earth?
%% Fuquay-Varina, NC % ... What is it worth?"
%%% 919-577-9882 % 'Mission (A World Record)',
%%%% <ya***@ieee.org> % *A New World Record*, ELO http://home.earthlink.net/~yatescr
Randy Yates wrote:
[ ... ] No. This is a very common misconception. No knowledge of one langauge is necessary in order to learn the other. (As a matter of fact it can sometimes be a hindrance). Strange that anyone would say this, since the overlap between the two is large.
Yes and no -- the overlap between the languages proper is quite large,
but the overlap between the parts a beginner wants/needs to learn first
are substantially smaller.
I don't think it's "necessary" to learn C first, but it would probably be optimum, since, for the most part, C is a subset of C++, and new concepts are usually better-learned in smaller chunks rather than larger chunks.
IMO, it's far from optimum. The problem is simple. what you learn at
the very first with both languages (e.g. x=y+z;) is identical. Almost
as soon as you move much beyond that, you have to learn _more_ with C
than with C++ to really do much. E.g. to write even a trivial program
to read in a text file, sort the lines, and print them back out, is
considerably more work to do at all well with C than with C++.
--
Later,
Jerry.
I_got_questions? wrote: I just started c programming. I want to migrate to c++. I know a little bit about class/inheritance. I am asking for good books to read. Elementary will be good.
Thanks for any comments
Hi
If I were you I would start with the books mentioned on http://www.rudbek.com/books.html
in that particular oder.
Thanks!! and have a nice day!!
Jaspreet
On 9 Jan 2006 14:52:21 -0800, "I_got_questions?"
<un************@hotmail.com> wrote: I just started c programming. I want to migrate to c++. I know a little bit about class/inheritance. I am asking for good books to read. Elementary will be good.
Thanks for any comments
It's a bit old now, but if you want a book detailing excellent
software design, try Design Patterns by Erich Gamma et al.
It's not specific to C++ (but it does contain C++ code), but it's a
wonderful book about reusable design patterns and an example of how
you should be aiming to code.
Mike Wahler wrote:
[snip] If you want to learn C, learn C. If you want to learn C++, learn C++. If you want to learn both, learn both. Either one first. But trying to learn both simultaneously is imo a recipe for insanity. :-)
[snip]
Indeed! Learning two computer languages at once causes
me to have what I call "centipede problems." A parable:
A centipede was busily getting on with his centipede day.
An ant walking by looked at the centipede and remarked
"I don't see how you keep track of all those legs. I have
enough problems with just six."
The centipede thought for a moment, looked at the ant,
and was never able to walk again.
Socks
Jerry Coffin wrote: I don't think it's "necessary" to learn C first, but it would probably be optimum, since, for the most part, C is a subset of C++, and new concepts are usually better-learned in smaller chunks rather than larger chunks.
IMO, it's far from optimum. The problem is simple. what you learn at the very first with both languages (e.g. x=y+z;) is identical. Almost as soon as you move much beyond that, you have to learn _more_ with C than with C++ to really do much. E.g. to write even a trivial program to read in a text file, sort the lines, and print them back out, is considerably more work to do at all well with C than with C++.
For one thing you have to start dealing with pointers before you even
understand what they are. Some of your first programs are going to
have scanf("%d", &i) in them and then later will have something like
scanf("%s", st). I've always found that beginners are baffled by that
difference because pointers are just too much to start with so you
don't teach them, but they see the diff and want to know why...no good.
In C++ all that crap is still there but it is hidden from the user.
You can really put off pointers until they are ready for them...you
don't have to make them use them, say, "Trust me," and then tell them
why 2 months from now.
"Randy Yates" <ya***@ieee.org> skrev i meddelandet
news:1w**********@ieee.org... "Mike Wahler" <mk******@mkwahler.net> writes: [...] "I_got_questions?" <un************@hotmail.com> wrote in message Thank you all for the suggestions. It is very helpful. I perhaps should know more about C programming before I move to C++. No. This is a very common misconception. No knowledge of one langauge is necessary in order to learn the other. (As a matter of fact it can sometimes be a hindrance).
Strange that anyone would say this, since the overlap between the two is large.
Most of C is present in C++, but it not used much. The C++ standard
library is much more powerful, so many old C relics can be forgotten.
You don't have to start by learning about strcat(), malloc(),
pointers, mysterious arrays that are sometimes like pointers, why you
use pointers as parameters, etc, etc. Not to mention format strings!
I don't think it's "necessary" to learn C first, but it would probably be optimum, since, for the most part, C is a subset of C++, and new concepts are usually better-learned in smaller chunks rather than larger chunks.
It's not optimum, as you will have to un-learn a lot (see above :-) to
write good C++. The low level stuff can be saved for later, not used
as in introduction.
If you haven't tried out "Accelerated C++", you really should. Too me
it was quite amazing that C style arrays and pointers are put off
until chapter 10, where they are introduced as:
"An array is a kind of container, similar to vector but less powerful.
A pointer is a kind of random-access iterator that is essential for
accessing elements of arrays, and has other uses as well."
At this point the student already knows how to define his own classes
and write generic functions. Standard containers and iterators are
used to explain how pointers work!
The "other uses" for the pointer is really not explained much either,
because there is no good use for it! Instead the book goes on to
explain how to write abstract data types and value classes, which are
much more useful.
C++ just is another language!
Bo Persson
"Jerry Coffin" <je**********@gmail.com> writes: Randy Yates wrote:
[ ... ]
> No. This is a very common misconception. No knowledge > of one langauge is necessary in order to learn the other. > (As a matter of fact it can sometimes be a hindrance).
Strange that anyone would say this, since the overlap between the two is large.
Yes and no -- the overlap between the languages proper is quite large, but the overlap between the parts a beginner wants/needs to learn first are substantially smaller.
I don't think it's "necessary" to learn C first, but it would probably be optimum, since, for the most part, C is a subset of C++, and new concepts are usually better-learned in smaller chunks rather than larger chunks.
IMO, it's far from optimum. The problem is simple. what you learn at the very first with both languages (e.g. x=y+z;) is identical. Almost as soon as you move much beyond that, you have to learn _more_ with C than with C++ to really do much.
I think I see your point. You're saying it's a waste to invest time
learning the C library functions (strstr(), printf(), etc.) if your
goal is to learn C++ since C++ has much more powerful mechanisms for
these types of things. I agree with that.
But..., I don't know about you, but I would still rather take a small
bite (byte?) with C rather than choke on C++ if I were just beginning
to program, i.e., to at least learn the basic, non-class language
syntax in a simpler environment.
--
% Randy Yates % "My Shangri-la has gone away, fading like
%% Fuquay-Varina, NC % the Beatles on 'Hey Jude'"
%%% 919-577-9882 %
%%%% <ya***@ieee.org> % 'Shangri-La', *A New World Record*, ELO http://home.earthlink.net/~yatescr
learn Pascal or Python and jump to C++ directly
and AFTER THAT, learn C, if you want to write low level code
Diego This discussion thread is closed Replies have been disabled for this discussion. Similar topics
6 posts
views
Thread by Christine |
last post: by
|
7 posts
views
Thread by tada991 |
last post: by
|
258 posts
views
Thread by Terry Andersen |
last post: by
|
7 posts
views
Thread by MiniStreak |
last post: by
|
7 posts
views
Thread by boostngti via DotNetMonster.com |
last post: by
|
3 posts
views
Thread by Khaled Hussein |
last post: by
|
4 posts
views
Thread by Sumit |
last post: by
|
2 posts
views
Thread by SF |
last post: by
|
76 posts
views
Thread by lorlarz |
last post: by
| | | | | | | | | | |