Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

good books to start from scratch

5 views
Skip to first unread message

game...@gmail.com

unread,
Apr 27, 2006, 7:56:02 AM4/27/06
to
Hey, I know some basic stuff in Visual basic and i know a lot in web
programming, and i am trying to learn C++ but no matter what book i
look at they seem to expect that u r an expert, even the ones that say
beginner on them. so what r some good book to start learning and what
tools will i need(I already downloaded free microsoft visual C++
compilers but they dont work like normal compilers)?


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

stefan....@gmail.com

unread,
Apr 28, 2006, 9:17:07 AM4/28/06
to
A very good book and one that is very nice for starters is
Thinking in C++, by Bruce Eckel. It's freely available online,
at http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html

The book starts small, but after you're done reading it, you'll
understand the entire C++ language (take this with a grain of salt,
nobody really understands C++ in its entirety).

Also, as a tool, I would recomend the GNU Compiler Collection.
The GNU C++ compiler is known for implementing the standard
very well. The microsoft compiler contains non-standard extensions,
which you shouldn't learn.

GNU C++ (g++) comes with any Linux distribution. If you insist to use
Windows, you could download Cygwin -- it gets you g++ and other nice
command line tools.

Good luck.

Jeffrey Schwab

unread,
Apr 28, 2006, 9:17:28 AM4/28/06
to
game...@gmail.com wrote:
> Hey, I know some basic stuff in Visual basic and i know a lot in web
> programming,

Which languages, specifically? Do you mean that you have written a web
page in HTML, or used a specific program, or have you written programs
in the Java language?

> and i am trying to learn C++ but no matter what book i
> look at they seem to expect that u r an expert, even the ones that say
> beginner on them. so what r some good book to start learning

If you're willing to put in a little time, _The C++ Programming Language
Special Edition_ by Bjarne Stroustrup is a good tutorial and reference,
and sections of it bear multiple readings. I would venture to guess
that most people who frequent this news group have their own copies of
the book, so if you have specific questions you will be able to get them
answered here.

Stay away from books of the _Learn C++ in 24 hours/days_ variety. They
seem to do more harm than good.

> and what
> tools will i need(I already downloaded free microsoft visual C++
> compilers but they dont work like normal compilers)?

Could you be more specific? I'm not a fan of Microsoft, but the most
recent version of the compiler seems to be OK from the command-line,
once you get used to the non-intuitive switches and unclear error messages.

If you have included any headers that use exceptions (e.g. <iostream>),
you may need to enable them with a switch:

cl /EHsc your_source_file.cc

If this is not the problem you have encountered, please create a text
file called main.cc and enter the following in it:

int main() { }

Open a command prompt and cd to the directory containing main.cc. Enter:

cl main.cc

What happens?

Btw, you will be more likely to get positive results from your posts if
you do not abbreviate "you" to "u" or "are" to "r". Don't skip
apostrophes ("dont") or use lowercase "i" when you mean "I." You can of
course post anything you like, but a little bit of effort makes life
easier for all of us.

Ulrich Eckhardt

unread,
Apr 28, 2006, 9:14:05 AM4/28/06
to
game...@gmail.com wrote:
> i am trying to learn C++ but no matter what book i look at they seem
> to expect that u r an expert, even the ones that say
> beginner on them. so what r some good book to start learning [...]

THE place to look for books online is http://accu.org, which has a huge
reviews section. Check any book you consider buying against those reviews.

Uli

Bob Hairgrove

unread,
Apr 28, 2006, 9:19:37 AM4/28/06
to

On 27 Apr 2006 07:56:02 -0400, "game...@gmail.com"
<game...@gmail.com> wrote:

>Hey, I know some basic stuff in Visual basic and i know a lot in web
>programming, and i am trying to learn C++ but no matter what book i
>look at they seem to expect that u r an expert, even the ones that say
>beginner on them. so what r some good book to start learning and what
>tools will i need(I already downloaded free microsoft visual C++
>compilers but they dont work like normal compilers)?

What books have you looked at so far?

--
Bob Hairgrove
NoSpam...@Home.com

Carlos Moreno

unread,
Apr 29, 2006, 7:18:17 PM4/29/06
to
Jeffrey Schwab wrote:

>> >>and i am trying to learn C++ but no matter what book i
>> >>look at they seem to expect that u r an expert, even the ones that say
>> >>beginner on them. so what r some good book to start learning
> >
> > If you're willing to put in a little time, _The C++ Programming
Language
> > Special Edition_ by Bjarne Stroustrup is a good tutorial

Errr, sorry, but no, it is not. It is a good, authoritative reference,
but it is the furthest possible thing from something useful to *learn*
to program in C++.

It is a must-have for someone who wants to be a serious C++ programmer;
but again, that's something that you'd seek after you have learned the
basics of the language through some other means.

Carlos
--

Gene Bushuyev

unread,
Apr 29, 2006, 7:22:19 PM4/29/06
to
<game...@gmail.com> wrote in message
news:1146096320....@u72g2000cwu.googlegroups.com...

> > Hey, I know some basic stuff in Visual basic and i know a lot in web
> > programming, and i am trying to learn C++ but no matter what book i
> > look at they seem to expect that u r an expert, even the ones that say
> > beginner on them. so what r some good book to start learning and what

Are you expecting too much too quickly? VB skills are only slightly
helpful. Web programming skills are not of any help at all. You can
learn Java script, or html, or php in a day or two, but to know C++ on
professional level takes a lot more time and efforts. You can look at
the list of books I recommend everybody who is serious about C++:
http://www.gbresearch.com/software_resources.html So prepare to spend
several months reading and practicing.

> > tools will i need(I already downloaded free microsoft visual C++
> > compilers but they dont work like normal compilers)?

VC8 is a superb tool. It has an excellent highly standard conforming
optimizing compiler, great Standard library implementation, and nothing
short of exceptional IDE. It's well organized, has a very comprehensive
help, and it's easy to configure. You don't need to learn all the arcane
command-line switches or bother with makefiles. So you can spend your
time learning C++ rather than the secondary stuff. You won't find any
better tool; keep it.

-- Gene Bushuyev (www.gbresearch.com)
----------------------------------------------------------------
There is no greatness where there is no simplicity, goodness and truth.
~ Leo Tolstoy

James Kanze

unread,
Apr 30, 2006, 12:51:41 PM4/30/06
to
Jeffrey Schwab wrote:
> game...@gmail.com wrote:

[...]


> Could you be more specific? I'm not a fan of Microsoft, but
> the most recent version of the compiler seems to be OK from
> the command-line, once you get used to the non-intuitive
> switches and unclear error messages.

Just curious (I'm not a fan of Microsoft either), but do you
know of any compilers which have intuitive switches and clear
error messages?

With regards to the switches, there is a problem with the
Microsoft compiler, in that you cannot compile any program using
standard headers without two or three additional options.

> If you have included any headers that use exceptions (e.g.
> <iostream>), you may need to enable them with a switch:

> cl /EHsc your_source_file.cc

I've found /GR to also be necessary, and you need yet another
option if you want pointers to member functions to work across
compilation unit boundaries (but I can't imagine that being a
problem in beginner's code).

> If this is not the problem you have encountered, please create
> a text file called main.cc and enter the following in it:

> int main() { }

> Open a command prompt and cd to the directory containing
> main.cc. Enter:

> cl main.cc

> What happens?

Lot's of messages about not being able to find different
DLL's:-).

Seriously, *installing* the compiler so it can be used from a
Cygwin environment is non-trivial. On the other hand, the
documentation explains very clearly how to do this -- I was
actually very surprised that Microsoft took Unix programmers so
much into consideration -- they don't actually mention bash, but
there is a page in the documentation about invoking the compiler
from the command line, and it goes into considerable detail
about handling the path variable, etc.

> Btw, you will be more likely to get positive results from your
> posts if you do not abbreviate "you" to "u" or "are" to "r".
> Don't skip apostrophes ("dont") or use lowercase "i" when you
> mean "I." You can of course post anything you like, but a
> little bit of effort makes life easier for all of us.

I'm not sure about "anything you like" -- I've had posts
rejected (correctly) because I accidentally wrote them in
French. And "u" is no more an English word than "tu" is.

--
James Kanze kanze...@neuf.fr
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France +33 (0)1 30 23 00 34

Alf P. Steinbach

unread,
Apr 30, 2006, 12:59:26 PM4/30/06
to
* Carlos Moreno:

> Jeffrey Schwab wrote:
>
>>>>> and i am trying to learn C++ but no matter what book i
>>>>> look at they seem to expect that u r an expert, even the ones that say
>>>>> beginner on them. so what r some good book to start learning
>>> If you're willing to put in a little time, _The C++ Programming
> Language
>>> Special Edition_ by Bjarne Stroustrup is a good tutorial
>
> Errr, sorry, but no, it is not. It is a good, authoritative reference,
> but it is the furthest possible thing from something useful to *learn*
> to program in C++.

That depends; I learned from that book and found it clear and very easy
to understand, much like "The C Programming Language" and "The UNIX
Programming Environment".

On the other hand, none of my students (long ago) thought so.

So I guess I'm in the minority.

Those IMO very good books focus on concepts, understanding, with code
examples, but near to zero about tool usage, to make things concrete.

The books the students preferred focused instead more on memorization,
with concrete cookbook recipes, including detailed tool usage.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

blwy10

unread,
Apr 30, 2006, 1:05:25 PM4/30/06
to
Gene Bushuyev said:
> great Standard library implementation

This post may be Off Topic, but anyway. I'm actually not too sure about
whetherr the standard library implementation is that great. After using
VC 8 since it was released, me and my friend/co-worker/boss have come
to find that the VC 8 std::map implementation appears to leak like
there is no tomorrow. I'm not too sure whether this is true, since the
standard library implementation is from Dinkumware and seems to work
well itself, but it certainly did give us quite a bit of headache. For
now, we're considering switching to STLport.

But anyway, back to on topic.

stefan.ciobaca_AT_gmail_DOT_com said:
> If you insist to use Windows, you could download Cygwin -- it gets you g++ and other nice command line tools.

You can also get MinGW: www.mingw.org Both MinGW and Cygwin provide g++
(GCC), but the difference is that Cygwin gives you a Unix emulation API
along with some programs that can turn your Windows into a mini Unix
[non intrusively], whereas MinGW is what you can call a normal Windows
compiler, albeit based on GCC code. The consequence os using Cygwin
[unless you specify -mno-cygwin] is that you need to resdistribute the
Cygwin runtime DLL, and that your code must be licensed under the GPL
or similar compatible licenses. If you specify -mno-cygwin during
compilation or use MinGW [which effectively do the same thing, except
MinGW is a smaller install IIRC], then not only do you not need to
redistribute the Cygwin runtime DLL, but you can also freely license
your program any way you like. [Warning: You MAY need to distribute
mingwm10.dll in the MinGW bin directory, but I've only needed to do so
when using a certain GUI library Qt. BUT, this does not pose any
licensing restrictions on you]

The advantages of using GCC/g++, as highlighted above, are its greater
C++ Standard compliance compared to VC (as of VC 7.1, I'm not too sure
who beats who when we compare GCC/g++ to VC 8), but it is not without
its extensions, but lacks some notable extensions, such as anonymous
structs, that many compilers implement. I'm not sure if any of these is
a disadvantage for you, but just to le you know. The only discernible
disadvantage I can glean from using GCC/g++ is that on Windows, GCC/g++
compiled programs linking to the C++ Standard library are HUGE and fat,
and most GCC/g++ programs run slightly [very slightly] slower than
those compiled from other compilers.

Since you're just starting to learn C++, none of this would pose a
disadvantage to you, as far as I can see.

Furthermore, if you would like to use MinGW and don't want to muddle
too much with the command line, you can use the many IDEs for GCC. A
good one for beginners is Dev-C++
http://sourceforge.net/projects/dev-cpp. If you need help using it,
http://sourceforge.net/forum/forum.php?forum_id=48211 the forum for
Dev-C++. Please try to avoid posting C++ questions there,
comp.land.c++.moderated is a better place for those. [Please note,
prior to posting there, please read "<-PLEASE READ BEFORE POSTING A
QUESTION" by a certain drwayne].

Lastly, as for a good book [yes, I know, finally something relevant],
aside from Bruce Eckel's Thinking in C++, which is very good IMO,
there's also Accelerated C++ by Andrew Koenig and Barbara E. Moo
(website: http://www.acceleratedcpp.com/). I haven't read any of it,
but for the past few months have heard good things about it. I don't
know about you, but it may be of some help.

Just my two cent's

Benjamin Lau

P/s Sorry if the line wrapping is a bit queer, I'm posting from
Google's Usenet interface, so I wouldn't know if anything goes wrong.

Jeffrey Schwab

unread,
Apr 30, 2006, 1:00:15 PM4/30/06
to
Carlos Moreno wrote:
> Jeffrey Schwab wrote:
>
>>>>> and i am trying to learn C++ but no matter what book i
>>>>> look at they seem to expect that u r an expert, even the ones that say
>>>>> beginner on them. so what r some good book to start learning
>>> If you're willing to put in a little time, _The C++ Programming
> Language
>>> Special Edition_ by Bjarne Stroustrup is a good tutorial
>
> Errr, sorry, but no, it is not. It is a good, authoritative reference,
> but it is the furthest possible thing from something useful to *learn*
> to program in C++.
>
> It is a must-have for someone who wants to be a serious C++ programmer;
> but again, that's something that you'd seek after you have learned the
> basics of the language through some other means.

You're entitled to your opinion, but I disagree.

marc.a...@gmail.com

unread,
Apr 30, 2006, 1:04:01 PM4/30/06
to
game...@gmail.com wrote:
> Hey, I know some basic stuff in Visual basic and i know a lot in web
> programming, and i am trying to learn C++ but no matter what book i
> look at they seem to expect that u r an expert, even the ones that say
> beginner on them. so what r some good book to start learning and what
> tools will i need(I already downloaded free microsoft visual C++
> compilers but they dont work like normal compilers)?
>

I think a good book for beginners is "Accelerated C++" by Andrew Koenig
and Barbara Moo. If you look for this book on Amazon.com, you can use
the Look Inside feature to read a sample chapter. It's best to "try
before you buy" to see if you like that particular author's style.

JS92647

unread,
May 6, 2006, 1:22:23 PM5/6/06
to
game...@gmail.com wrote:
> Hey, I know some basic stuff in Visual basic and i know a lot in web
> programming, and i am trying to learn C++ but no matter what book i
> look at they seem to expect that u r an expert, even the ones that say
> beginner on them. so what r some good book to start learning and what
> tools will i need(I already downloaded free microsoft visual C++
> compilers but they dont work like normal compilers)?

http://newdata.box.sk/bx/c/

Self-explanatory. Since you already code in web languages, you should
be able to understand. My friend didn't know C++ at all, he read that
and he programmed a hefty amount of useful tools for games...

I am not saying it will work for you too, but honestly the only way to
learn is by practice, and for me pointers were challenging to get a
concept of until I started using them to a good degree.

francis....@gmail.com

unread,
May 8, 2006, 3:41:54 PM5/8/06
to
I agree. I learned C++ from the book "Accelerated C++" and greatly
recommend it to everyone.
However, the learning curve is steep. Keep in mind that learning C++
requires a significant amount of time and discipline. If you have
questions with some of the content or the exercises you can post them
here and you will get expert advice.

Ulrich Eckhardt

unread,
May 8, 2006, 3:42:57 PM5/8/06
to
JS92647 wrote:
> http://newdata.box.sk/bx/c/

Do not take this as introduction to C++. It teaches way too many wrong
things.

Just a few samples from chapter 15, "advanced inheritance":

- It starts off with giving an example of aggregation, which has pretty
little to do with inheritance.
- #include <iostream.h>
- It sketches a badly written string class instead of using the one from the
standardlibrary.
- It takes its bad implementation of its string's operator+ as reason for
breaking const correctness, showing a severe misunderstanding of how some
things work.
- It then builds a linked list (again, as badly implemented as the string
class).
-...

The whole book doesn't even mention that there is a C++ standardlibrary
outside of IOStreams. In fact it seems like it was targetting a
pre-standard C++ dialect or, to put it differently, a dialect that is now
obsolete.

Sorry, but this is not a good way to learn modern C++.

Uli

Gerhard Menzl

unread,
May 8, 2006, 3:43:53 PM5/8/06
to
JS92647 wrote:

> http://newdata.box.sk/bx/c/
>
> Self-explanatory. Since you already code in web languages, you should
> be able to understand. My friend didn't know C++ at all, he read that
> and he programmed a hefty amount of useful tools for games...
>
> I am not saying it will work for you too, but honestly the only way to
> learn is by practice, and for me pointers were challenging to get a
> concept of until I started using them to a good degree.

One day each for object-oriented analysis & design and templates?
Ridiculous. I wouldn't access a book like this with with ten levels of
indirection.

--
Gerhard Menzl

#dogma int main ()

Humans may reply by replacing the thermal post part of my e-mail address
with "kapsch" and the top level domain part with "net".

The information contained in this e-mail message is privileged and
confidential and is for the exclusive use of the addressee. The person
who receives this message and who is not the addressee, one of his
employees or an agent entitled to hand it over to the addressee, is
informed that he may not use, disclose or reproduce the contents thereof.

Andrew Koenig

unread,
May 10, 2006, 8:36:26 AM5/10/06
to
<francis....@gmail.com> wrote in message
news:1147076550....@i39g2000cwa.googlegroups.com...

>I agree. I learned C++ from the book "Accelerated C++" and greatly
> recommend it to everyone.

Thanks!

> However, the learning curve is steep.

Thus the title :-) If you set out to learn C++ from "Accelerated C++," you
have to read every word. You can't just bleep over parts you don't
understand the first time. That is the downside of having a 350-page book
instead of an 850-page book.

> Keep in mind that learning C++ requires a significant amount of time and
> discipline.
> If you have questions with some of the content or the exercises you can
> post them
> here and you will get expert advice.

If you would rather read an 850-page book and not have to read as carefully,
I suggest you consider the 4th edition of "C++ Primer." Barbara rewrote the
third edition completely, using many of the principles behind "Accelerated
C++." It is more conventionally organized than "Accelerated C++," as well
as being less--umm--accelerated.

It's really a matter of what learning style you prefer.

Colin Wills

unread,
May 11, 2006, 8:31:38 AM5/11/06
to
Alf P. Steinbach wrote:
> * Carlos Moreno:
> > Jeffrey Schwab wrote:
> > > If you're willing to put in a little time, _The C++ Programming
> > > Language Special Edition_ by Bjarne Stroustrup is a good tutorial
> >
> > Errr, sorry, but no, it is not. It is a good, authoritative reference,
> > but it is the furthest possible thing from something useful to *learn*
> > to program in C++.
>
> That depends; I learned from that book and found it clear and very easy
> to understand, much like "The C Programming Language" and "The UNIX
> Programming Environment".
>
> On the other hand, none of my students (long ago) thought so.
>
> So I guess I'm in the minority.
> [...]

I too learned C++ by starting with Stroustrup. But then I had
programmed for years in assembler, PL/1 and C and knew a lot about the
hardware and operating systems that I used. To program web pages and
the like you might not need to understand much about stacks, heaps,
threads and so on but you probably do in any non-trivial C++ work. (If
you already do go ahead and read Stroustrup.) I don't know whether
those introductory C++ language books go into the relevant computer
science concepts but if not you may need to start with some more
general computer science text books.

0 new messages