Whats the best book for a beginner

P

Panama Red

I would like to learn to program in c++ on Linux and AIX
systems...mainly socket and fifo type stuff. Can someone
recommend a book for someone with experience only with
Perl, shell, and Pick/Basic ?

Thanks
 
J

JKop

Panama Red posted:
I would like to learn to program in c++ on Linux and AIX
systems...mainly socket and fifo type stuff. Can someone
recommend a book for someone with experience only with
Perl, shell, and Pick/Basic ?

Thanks


I started off with... uuuggghhh... Visual Basic, writing Windows programs.
That was about 5 years ago. I very quickly tired of that and then just
looked around and asked what's the best language. Having heard the arguments
for each, I quickly decided on C++. I've seen dozens of beginners books for
C++, but without a single doubt in my mind, _the_ best for _me_ was "C++ for
Dummies" by Steven R. Davis. I think the latest book is the 4th edition.
That book teaches you C++ pretty much inside out. After that, to really know
the language, all I did was go to the Microsoft MSDN site and view a list of
all of C++'s keywords. I clicked on the ones I didn't recognize, eg.
"explicit" "namespace", and learned about them all.

Once you've done that, I recommend you learn about the structure of a C++
program, ie. source-code files, header files, object files, the compiler,
the linker.

After that, you will truly understand C++ and probably like it very much!


After that, you can move onto platform-specific programming, eg. Linux,
Windows.


I myself then moved on to Win32 programming. You use the Win32API, which is
just a bunch of functions, to create Windows and the like, eg.:

int main(void)
{

CreateWindow("Hello",blah blah blah);
return 0;
}



Microsoft has very much tried to hijack C++. For example, they tell you that
a Windows program starts at "WinMain" as opposed to "main". When actually,
what happens is that your program starts at some other function that then
does a load of stuff and then finally calls the "WinMain" function you
wrote. There's articles written about this, but you're a couple of months
away from that(if you choose to do Windows programming!).


First thing, I suggest "C++ for Dummies", the latest edition by Steven R.
Davis!


-JKop
 
P

Peter van Merkerk

Microsoft has very much tried to hijack C++. For example, they tell you
that
a Windows program starts at "WinMain" as opposed to "main". When actually,
what happens is that your program starts at some other function that then
does a load of stuff and then finally calls the "WinMain" function you
wrote.

You can blame Microsoft for many things, but also on other (non-MS)
platforms a lot of things happen before the first line of the main()
function is executed. This is simply because it is needed to get a program
up and running.
 
P

Peter van Merkerk

I would like to learn to program in c++ on Linux and AIX
systems...mainly socket and fifo type stuff. Can someone
recommend a book for someone with experience only with
Perl, shell, and Pick/Basic ?

You might want to take a look at "Accelerated C++"
(http://www.acceleratedcpp.com/), which is by many people considered to be
one of the best beginners book for C++ for people with some programming
experience. If you are not able to or unwilling to spend money on a book
you may consider looking at "Thinking in C++" which is available online
(http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html). For book
reviews go to: www.accu.org

A final note: the C++ language itself has no support for socket
programming. Consequently you won't find any mention of it in the books I
mentioned. For socket programming you need external libraries which are
platform specific (though there are libraries that support multiple
platforms like ACE; http://www.cs.wustl.edu/~schmidt/ACE.html). This group
only discusses the C++ language itself, so any questions about socket
programming or other platform specific services are off-topic here. I
recommend you keep a clear separation between what belongs to the C++
language on one side and the platform specific stuff on the other side.
 
D

Dave Moore

Panama Red said:
I would like to learn to program in c++ on Linux and AIX
systems...mainly socket and fifo type stuff. Can someone
recommend a book for someone with experience only with
Perl, shell, and Pick/Basic ?

Thanks

There is a book from O'Reilly called something like "C++ for Embedded
systems", which is probably specific to the types of problems you want
to solve. However not having read it myself, I cannot really
recommend it .. only make you aware of its existence 8*).

For a general introduction to C++, I used "Practical C++ Programming"
(also from O'Reilly) by Steve Oualline ... it is woefully out of date
now, and predates the ISO C++ Standard, but it still IMO gives a good
introduction to the basics. It promotes a "walk-before-you-run"
philosophy and gives lots of clear explanation and general advice for
good programming practices. Also, there may be a more up-to-date book
from the same author.

Finally, FWIW I must say that I have never bought a book from O'Reilly
that I haven't found useful (usually extremely so), so if they now
have a book titled, "Learning C++", I would probably look hard at that
one.

HTH, Dave Moore
 

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
474,167
Messages
2,570,910
Members
47,453
Latest member
MadelinePh

Latest Threads

Top