473,404 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

asking about good books

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

Jan 9 '06 #1
17 1864
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...
Jan 9 '06 #2
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
Jan 9 '06 #3
"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

Jan 9 '06 #4

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++.

Jan 10 '06 #5
I'd recommend two books:
1) Deitel "Programming in C++"
If thats too easy, try abovementioned Stroustrup "The C++ Language",

Jan 10 '06 #6

"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
Jan 10 '06 #7
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...
Jan 10 '06 #8
"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
Jan 10 '06 #9
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.

Jan 10 '06 #10
Thinking in C++ Bruce Eckel
http://www.mindview.net/Books/TICPP/...ngInCPP2e.html

Jan 10 '06 #11

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

Jan 10 '06 #12
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.
Jan 10 '06 #13
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

Jan 10 '06 #14

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.

Jan 10 '06 #15

"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
Jan 10 '06 #16
"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
Jan 11 '06 #17
learn Pascal or Python and jump to C++ directly
and AFTER THAT, learn C, if you want to write low level code

Diego

Jan 11 '06 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Christine | last post by:
I am looking for some good C/C++ tutorials either online or in book form. I am using Dev C/C++ 4 (from www.bloodshed.net) and I am using WindowsXP operating system. I don't have the money for...
7
by: tada991 | last post by:
Hello Everyone, I just purchased Visual Studio .Net Architect 2003 and want to know what's a good book for begginers to start with. I know nothing about programming whatsoever, but I do have a...
258
by: Terry Andersen | last post by:
If I have: struct one_{ unsigned int one_1; unsigned short one_2; unsigned short one_3; }; struct two_{ unsigned int two_1;
7
by: MiniStreak | last post by:
Hi fellow programmers................... I am trying to learn ASP .NET ver 1.1 using VB .NET only on a windows 200 Pro machine. I have done quite a bit with ASP 3 but have been off programming...
7
by: boostngti via DotNetMonster.com | last post by:
I have 4 years of programing exp. with Coldfusion, and I am begining to learn ASP.NET C# and was wondering if some people could suggest some good books. I went to Barnes & Noble the other day...
3
by: Khaled Hussein | last post by:
Hi every body, I am working as freelancer, and I wanted to start posting my CV and ask for job offers... But as I know that this is a public newsgroups so I am not allowed to do all what comes up...
4
by: Sumit | last post by:
Hello! I I am new to this group and a beginner in C programming. I want to know that now should I give more importance in learning programming fundamentals and program solving or on good...
2
by: SF | last post by:
Hi, I have done some coding with Access and I want to try using VB.NET. I am looking for a good book with examples specially on data access (database). Could someone in this group recommend? ...
76
by: lorlarz | last post by:
Crockford's JavaScript, The Good Parts (a book review). This shall perhaps be the world's shortest book review (for one of the world's shortests books). I like Douglas Crockford (because I am a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.