C++ Programming Resource

J

Thread Starter

Jeff Shiepe

Hello Listers,

I was wondering if someone could recommend a good C++ programming resource book that would help me get started in C++ programming. I have C
programming experience, nothing extensive though, and might consider myself an intermediate C programmer. I am looking to start dabbling in C++ but need a good resource with some practical examples that are easy to follow and an author who doesn't assume his audience is made up of prodigies from Redmond, WA.........:). I've done some searching at Amazon.com which yielded quite a list, and I was hoping to narrow that down with recommendations from some of the seasoned programmers out there.

Thanks to all in advance.

Jeff Shiepe
Nestle USA, LJ Minor
[email protected]
 
I hope that your not offended if I suggest "C++ for Dummies" It is actually pretty good, and it is fairly cheap. Cheap is good because you
will want to upgrade to a more advanced book in the future. Do not buy the advanced book when starting out, however, or you may get lost in it.
Bill Sturm
Applied Grinding Technologies
 
D

Davis Gentry

Ok - are you talking C++ on UNIX or VC++ on Windows?

One of my favorite references for C++ on UNIX is "C++ In Plain English" as a nice starter book. ISBN - 1-55828-472-9 I also have a couple of really handy cheat sheets distributed by a company found at www.ssc.com which are good for command syntax, etc (though I just checked and see that they haven't got a c++ reference).

If you are talking VC++, I have yet to find what I
consider to be a really good reference. I have about 6 books, all of them ok, and all of them good enough to learn to write your standard "hello world" program, but all of them tend to be aimed at the IS world rather than the engineering world, and when you start talking specific, hard core coding, they fall on their faces. The online help in VC++ is very good if used with MSDN (which I think is now required with the VC++
6.0 anyway).

Davis Gentry
Carpenter Company
 
A

Anand Sharma

Dear Friend, One of the best books I have came across for C-plus plussing is a book by Robert Lafore-I think the book's name is Understanding C++ . The book begins with the fundamentals programming and shows ways in which you can create marketable programmes. It's a good book that gives insight into what might be accomplished by C++. Another good book for ambitious beginners is a book by Yashwant Kanetkar-"Let us C++" is the name. Sharma
 
P
Don't get your hopes up too high! C++ takes a LONG time to learn. (There's a BIG difference between C and Visual C++.) I remember one of several books I went through said something along the lines of "Even if you're a professional programmer, don't expect to do anything useful with C++ for the first 10 months. It will take you that long just to see through the fog."
After 10 months of struggling on my own with several books, I eventually gave up and went back to VB. Unless you are a professional programmer, I'd suggest something else.

BTW, I've been very happy with the book reviews at Amazon, and buy all my programming books from them.
 
A

Alex Phrasavath

The best book covering C++ is 'Thinking in C++' by Bruce Eckel. He has a second edition out soon. Complete text of his recent books is posted online at http://bruceeckel.com

-------------------------------------------------
Alex Phrasavath
Senior Consultant, Controls System & Applications
BrightStar Information Technology Group, Inc.
Integrated Controls Division, Houston
 
I've got the book mentioned below. In fact, it was the first VC++ one I got. It taught me the MS Visual Environment and some of the tools, but I was still clueless on all the underpinnings, foundation classes, C language, and how to tie it all together. Keep in mind that the MS publications on Visual C++ (on CD, or the printed version) compromise 6 LARGE volumes! By the time
I got used to version 4, version 5 came out. They've been on version 6 for about a year. It's a never ending battle just to stay current! Thinking that anyone could learn VC++ in 21 days is an absolute JOKE (but it will sell books).


-----Original Message-----
From: Boudreaux, M (Mike) [mailto:[email protected]]

You can view "Sams Teach Yourself Visual C++ 6 in 21 Days" and "Sams Teach
Yourself C++ in 21 Days, Second Edition" for free at on the informit.com web
site ...<clip>
 
R
List Management Account wrote:

> Don't get your hopes up too high! C++ takes a LONG time to learn. (There's a
> BIG difference between C and Visual C++.)

Please do not confuse C++ with programming the windows 32 bit API via Visual C++.

The latter product appears to be DESIGNED to make users want to use VB (with all it's drawbacks) for anything except undelaying DLL's and drivers.

I learnt C++ many years ago with the DOS based Turbo C++, which is a really simple way to learn how to make and use C++ objects. It took me a few weeks (studying in the evenings) to work througth the book.

If you want to do C++ windows programming, you may be interested in Visual C++ alternatives, such as those from Borland and IBM.

C++ is after all just a front end to C that allows class definitions, and hence object creation and manipulation. The difficulty in using Visual C++ is the obfusication and 'jargon wrangling' of the WIN32API.
 
D

Darryl L. Palmer

Stroustrup's book is the best C++ resource that is out there. The problems with it is that it gives too much information for new C++ programers, don't get me wrong though it is a definate resource to have, also look at Scott
Myers' books, Effective C++: 50 Specific ways to improve your program and design and his other book More Effective C++: 35 new ways to improve your program and design.

If you want to get some exposure to code reuse and design patterns, I recommend getting the "Gang of Four" book, Design Patterns : Elements of
Reusable Object-Oriented Software, and the "Siemens" book, and be sure to start to learn UML.


Darryl Palmer
 
S

Silicon Dynamics Consulting Inc.

As has been pointed out you could take a couple of things into account before deciding which books to buy. There's the Generic C++ part of C++ and the Windows Part of C++.

The C++ language by itself allows you to use most of the C language without significant changes. It's really not a huge jump from C at the basic level, without the Windows stuff.

The Good News is you can stiill write everything the way you did in C and compile it with your
C++ compiler, except now you can tell everyone it's a C++ program. You will instantly appear elevated to your friends and family.

E.G.: malloc is replaced by new . Although malloc can still be used since C++ is supposed to be a superset of C. cout << replaces the old printf etc. Although printf can still be used.

Most books about C++ start by doing mostly C like Console Applications.

Then Introduce the idea of OOP (Object Oriented Programming) with simple console apps.

Classes for old C programmers can be initially thought of as struct's with functions inside them.
This is an over simplification but may demystify the over mystified OOP terminology.

It makes sense to use OOP sometimes but not all the time.

After 10 Chapters you will have mastered the C++ language :)

You'll now be able to amaze your friends and family with a Text Program running in a DOS box on your windows screen.

Not what you're Looking For ?? Read ON.

MOST BOOKS THEN MAKE A GIANT LEAP INTO WINDOWS PROGRAMMING. Usually By Creating a Template Hello Program Generated By The Environment. This program usually looks a lot more cluttered than those text examples you typed at the beginning of the book you bought.

If your goal is to write Windows Programs in C++ then you really have to learn a a whole bunch about the Windows API (Application Programmers Interface) as well as the C++ language as it is strictly defined.

E.G.: Your New Hello Program calls Windows API functions and Windows does magic things.
It Draws your Window and Gives your program a handle to refer to it with. Then Windows Continuously Passes Messages Back to your app through a pointer to a function in your program. You then act on those messages. Like Mouse Clicked at X Y etc. This would not be entirely obvious if you knew nothing about Windows internals and everything about C++.

Microsoft currently implements this API through C++ Classes that wrap the Windows API functions. This is called the Microsoft Foundation Classes or (MFC). MFC has nothing to do with C++ (although it is written in C++), at least in the sense that the creator of C++ never mentioned MFC , as far as I know anyway.

Microsoft themselves point out in their Developers Network Documentation that there is a STEEP learning curve (6 to 12 Months) to master MFC. Not very encouraging if you have to get up and running quickly. Although depending on your previous experience with Windows development this time may be a lot shorter.

Borland takes a somewhat different approach to creating Windows Applications with their C++ Builder Product. Borland Claims you can use MFC code (MFC Ver 4.2) with their compiler but also provides a more Visual Development Environment for creating C++ Windows programs. Components from the (VCL) can be plunked on Forms and the
event handlers can be filled in . Similar to the Delphi environment.

If you have a compiler already then look for books related to that compiler. Most Books provide a Basic Version of some C++ compiler. Usually Microsoft with limitations built in.

The Bottom Line is in your study of C++ you could take into account the Platform (Windows, Linux etc.) you would target your apps for as well as the Provider of the Compiler. MS , Borland (Whoops Inprise) etc.

Avoid any books about OWL. This is toast now. This was Borlands Version of the MFC. C++ Builders VCL takes care of that.

Also Microsoft Visual C++ is at about Version 6 now and the MFC is changing all the time as well to accommodate new features of new MS OS's so new code may not be backwards compatible with older compilers and Versions of the MFC. Borlands C++ Builder is at around Version 4.

If you want to do anything Useful with Hardware Control then forget about that MFC ring three stuff and get out your checkbook to subscribe to the MSDN and get your hands on DDK's (Device Driver Kit's). Of course drivers for Win 95, 98 and NT are all a little bit different. The good news is you can use plain old C. Win 2000 will use the WDM (Windows Driver Model) you might
need that too. Not sure about Windows Millennium.

Doesn't matter how smart you are there's just a heck of lot to keep up with :)

You'll See Lots of Books Like (Learn XYZ Inc. C++ Ver XX ) Just make sure XX is the latest version of whatever XYZ Incorporated makes or you could be wasting your time.

As a side note: Interesting how C was touted as a language that was easily transported from Platform to Platform in its early beginnings. When even C++ implementations on the Same Platform can be used so they are not Compatible with each other in this Year 2000.


Sorry this reply turned into a bit of a Novel.

Hope this Helps in your journey.

Pat Tisdall
Silicon Dynamics Consulting Inc.
 
D

Darryl L. Palmer

I have to disagree with you here, the problem is not the Win32 API, the problem is that there are so many other SDKs and APIs. Now the interesting
thing is that if you want to use these SDKs and APIs the chances are that the code that is out there, either from Microsoft or 3rd parties, work in VC++ and not Borland.

Darryl Palmer
Cleveland State University

-----Original Message-----
C++ is after all just a front end to C that allows class definitions, and hence object creation and manipulation. The difficulty in using Visual C++ is the obfusication and 'jargon wrangling' of the WIN32API.
 
S
Dear List:

Also, be sure to distinguish between

Programming using an object oriented language such as c++ and
Serious system design using object oriented techniques.

Object oriented design is, like any design paradigm, complex and takes time (and several systems, i.e., mistakes) to have any deep understanding.

I have two c++ books and several times that number of object oriented analysis and design books.

It is one thing to take a "conventionally" design system and toss in a few objects, usually at the lower levels. It is quite another to
properly decompose a complex system into robust objects. Indeed, my experience so far for industrial control product designs indicates
that "control path" (flow charts, timing diagrams, state diagrams) or even "data path" (data flow diagrams, message flow diagrams) are
often better suited than "object oriented" design techniques -- at least at the overall system level -- though some objects are nice typically
at lower levels. But in many cases the required "object" behaviors of these "lower level components" can be implemented using any language,
such as c or even assembler. It just is easier to do the complex stuff with an object oriented language such as c++.

Much of the bad mouthing that the Microsoft Foundation Classes gets comes from folks who are not using the provided objects in a robust
object oriented system design and who may not fully understand object oriented analysis and design. Of course, anther large segment of the
bad mouthing that the Microsoft Foundation Classes gets comes from folks who *DO* understand object oriented design and find the classes,
--- uh, how shall I say it, --- "less than optimal"

Cheers, steve
 
C

Chesney, Mark D.

I don't understand your logic - programming the WIN32 API using Visual C++ is no more difficult than programming it with Borland or IBM tools.

I also don't understand what you mean about the "obfusication and 'jargon wrangling' of the WIN32API". It is no more difficult to program than
X-Windows or Macintosh.

As for Visual C++ being so difficult, it can actually make programming the WIN32 API much easier if you use MFC. I'm not saying that MFC is elegant or great or anything like that, but it can substantially reduce the time required to develop a WIN32 application.

BTW, I like Visual C++ much better than VB, for developing everything from GUI apps to COM objects. And it's a pretty darn good development environment for developing and debugging C++ apps. The embedded software development
guys that I work with are green with envy, 'cause their development environment doesn't have anywhere near the capabilities that Visual C++
does! :)
 
D

Darryl L. Palmer

>Also, be sure to distinguish between >Programming using an object oriented language such as c++ and
>Serious system design using object oriented techniques.

Maybe this should be:
1) Programming using an object-oriented language such as c++
2) System design using a mediocre object-oriented langauge such as c++, at least it is better than visual basic or object-oriented COBOL.
3) Serious system design using a "real" object-oriented language such as smalltalk.

>But in many cases the required "object" behaviors of
>these "lower level components" can be implemented using any language,
>such as c or even assembler. It just is easier to do the complex
>stuff with an object oriented language such as c++.

It is best to use object-oriented design with an object oriented language.

Darryl Palmer
Cleveland State University
 
B

Boudreaux, M (Mike)

Steve Cliff wrote:

>Much of the bad mouthing that the Microsoft Foundation Classes gets
>comes from folks who are not using the provided objects in a robust
>object oriented system design and who may not fully understand object
>oriented analysis and design. Of course, anther large segment of the
>bad mouthing that the Microsoft Foundation Classes gets comes from
>folks who *DO* understand object oriented design and find the classes,
>--- uh, how shall I say it, --- "less than optimal"

And then there's the people who just plain hate Microsoft for being
Microsoft and will bad mouth just about anything with the Microsoft logo.
(I'm not accusing anyone of being this way, just a general statement - no
flamefest, please...)

Mike Boudreaux
http://mike.boudreaux.net
 
S

Shiepe,Jeff,CLEVELAND,Engineering

I would like to sincerely thank everyone for their insightful responses to
my request for a C++ Programming resource. Your responses have prompted me
to look a little deeper and decide just where exactly my focus in the study
of this language should be. Working in an industrial automation
environment, I would imagine that eventually, I would want to have the
ability to write small custom applications that common HMI
packages(e.g.Wonderware, Intellution, etc.) may not offer. These packages
have fulfilled my requirements thus far, but if someday they do not, it
would be nice to have the ability to supplement an application with some
custom code.

I realize that from where I'm at currently, that ability may be months,
probably years, away. You all make some great suggestions and I also
appreciate the "caveats". These were all the types of responses I was
hoping to receive from seasoned professionals. Thanks again and keep'em
coming if you have them!

Jeff Shiepe
Nestle USA, LJ Minor
[email protected]

P.S. BTW, so far, my development tool of choice has been MS Visual C++,
version 6.0.
 
Top