Off Topic - Learning C++

wdd0422

Member
Join Date
Nov 2003
Posts
100
Can anyone recommend a good beginers book for learning Visual C++ ? Also any tips or suggestions on how to get started, what I'll need and what worked best for people who self taught themselves this language.

Thanks in advance for any help
Bill
 
I used to use the (free) Bloodshed Dev environment. Visual C++ is the name of Microsofts C++ IDE - I'm not sure you were meaning to be that specific. You can also download the free, Visual Studios Express Edition, which includes that. I'd avoid the Linux compilers (gcc, g++) as building and makefiles can be a pain.

If you're after a simple approach to "learning to program" as in: using variables, functions, conditions, etc, for no specific reason, you'd be better off with a scripting language like PHP or Python. C can be syntactically picky and lead to a painful experience. If you're bent on intro GUI work, Visual Basic is probably your best bet - download the free version of Visual Studios (Express Edition).

If you still want to learn C++, pretty much any book should do. Just open it up to the middle and see how they explain things - they can be more or less pedagogical and sometimes over the top. When I started learning C many different compilers didn't support the ANSI standard - it was strange to type example code directly from the book and get a lot of error messages. You won't have that problem anymore. C++ is a language that you should be able to get started in with just a book and your computer.

wdd0422 said:
Can anyone recommend a good beginers book for learning Visual C++ ? Also any tips or suggestions on how to get started, what I'll need and what worked best for people who self taught themselves this language.

Thanks in advance for any help
Bill
 
I would say look for the beginner books with lots of code examples.
Also the web has a ton a sites for basic routines once you get started.
Microsoft press also makes very good books on a variety of subjects concerning C++ as well as other languages.
 
I have two books I bought when I was starting to learn C++. They were C++ Without Fear by Brian Overland and Practical C++ Programming by Steve Oualline. I would recommend either, they gave many examples and took you though everything step by step. There are also some good websites to get information or programming examples. www.cprogramming.com was probably the best one I found but www.cplusplus.com is not bad either.
 
FYI, Bjarne Stroustrup is the "author" of C++. He did a lot of work as the head of some Lab at AT&T back in the day. Basically, he's the man.

His books makes great reference material. They're a bit hardcore for a first introduction to programming.

Matthias von Zorn said:
Dont forget Bjarne Stroustrup's books as well.
 
Thanks everyone for the replies. No I don't know C programming. I guess a better question would be what language should I learn besides Ladder, SFC...that I would use the most for factory automation, data acquisition etc. I want to gain some new skills and continue learning but I'm unsure what would be a good direction to go as in should I try to learn C, C++, Visual Basic or "a scripting language like PHP or Python" as someone suggested. I haven't had a chance to look at all the websites and books people have suggested so far but I will first chance I get. Again I appreciate the replies and help.

Thanks
Bill
 
I'd start with VB and VBA. Lots of HMI packages use it for scripting and add-ins.
 
wdd0422 said:
I guess a better question would be what language should I learn besides Ladder, SFC...that I would use the most for factory automation, data acquisition etc.

A lot depends on your definition of factory automation. Most of my production work is done in C now. My research work is done in Mathcad. Jacob does most of the PLC programming. I don't think I have programmed a PLC in a significant way for 5 years now. The last bit was SCL used on the Siemens project. ST/SCL is a must for procedurual based programming.

For the nitty gritty programming I would chose C perhaps C++ but one can easily go from C to C++. Most of the extra features of C++ are not used in embedded/system programming. VB or PHP isn't used for system/embedded programming.
 
I agree with Pete N - depends on what you want to do.

C would be the better route if you're interested in embedded programming. It's also more technical, making it a good launching platform if you plan on really getting into programming, software development, writing drivers, etc.

I recommended scripting languages or VB as a gentle introduction to programming methodology in general. Procedural programming at at least this level is a useful fundamental tool - even if you plan on being a PLC programmer and never using it directly. As Robertmee pointed out, VB/VBA is useful for HMI programming - many vendors (Rockwell) use it. I would generalize this to "learning how to script" is useful - since the fundamentals are the same. For that matter, MS dropped VBA in favor of PowerShell and .NET versions.

If you want to learn ladder - do so. If you want to play around with programming, feel free, it's a great idea. It doesn't require a commitment on your part. Find a book (or website), download a free IDE, and go to town. Write a "hello world" program in C, dynamic web page with PHP, script in python, or VB app. Play with one or try them all!
 
I 'm pretty well versed in PLC, SFC, And Robot Programming, just looking to add to what i'm doing now.

Bill
 
wdd0422 said:
I 'm pretty well versed in PLC, SFC, And Robot Programming, just looking to add to what i'm doing now.

Bill
Programming is a lot of fun. I'm no expert, but like to play around.
SCL looks quite interesting, and I think I might play with that eventually, but right now I'm working on c myself.
Bruce Eckel has a great little training course out: Thinking in C: Foundations for Java and C++. It can be downloaded for Free! at www.mindview.net
 
Visual basic is a very useful thing to know in industrial automation. You can use it for all kinds of things, from data acquisition to database work. It's also simple and you can play with it just by opening the visual basic for applications editor that comes in word or excel (excel recommended). It's never going to control the space shuttle but it's simple to use and can give you some extra arrows for your bow when needed.

If it's embedded control you want to focus on, then plain C (rather than the more complex and capable C++) is much more widely used as far as I can tell. Shaums Outlines do a great introductory text, but if you really want to learn embedded C get a microcontroller kit (I've got one of these for my hobbies) and see what you can do after learning the basics from a book.
 

Similar Topics

This is the motor nameplate from one of the powder hoist motors on the USS Texas an older generation battle ship, built in 1911-1914 ish. The...
Replies
1
Views
293
Totally off topic, but strange observation. I purchased a few cisco ethernet switches off of ebay some years ago. They are part of a home lab...
Replies
6
Views
2,078
Good morning, Please excuse me if this is too off topic here, but it is a programmable controller of sort. I have an Omron ES100P temperature...
Replies
4
Views
2,339
Which way is up and what's that strange looking bug? I was trying to login to micro_cr*p team_Shi* and it wouldn't let me because I exhibited...
Replies
10
Views
2,703
Hi folks, I have a hydraulically driven rake in a clarifier that rotates at about .18 rpm. When there is a process upset, the bed of the...
Replies
12
Views
3,727
Back
Top Bottom