To all VC++ and C++ programmers: a newbie in need of help

faceplate

Member
Jun 21, 2001
51
0
0
Hello everyone. I am pretty frustrated now. I have been trying to learn VC++/C++ for a while and thing just have not been working out. I first bought Beginning Visual C++ by Ivor Hortan. The book is half about the c++ language and half windows programming. I tought the book went a little too fast. I asked a question on this board. One book that was reccommened was C++ Primer Plus by Stephen Prata. I went to my library to see if they had it. I ended up getting C++ Primer by Lippman and C++ Black Book by Holzner. C++ Black Book goes at a good pace, but it has nothing but syntax and examples. I never has anything that instructs the user. C++ Primer is really in-depth, and the introduction of some things seem strange. It has exercises, but no answers.

What I am looking for is a C++ that teaches you to program and not just the C++ syntax. I am looking for exercises, code to correct, program specifications and code to compare with. I am thinking of something that might be used for a class almost. I know my ability is really low. Some people have told me to just mess around, and play with some code. I just dont get very far with that. I need something structured. I want to program. Does anyone know of a reasource where I can get a "programming lesson" and not just a C++ syntax guide. C++ Primer came kind of close. I am only at page 100 or so. It should have me writing programs by now though. Perhaps C++ Primer Plus is what I am looking for. Any help is really appreciated. Thanks
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Have you thought about taking programming classes ar your local community college?

Also you might do better adding something like a "progamming games with C++" book to your stack of langauge books. Or maybe find an old DOS games book that has simple games, and try converting some of them to Windows (windows console app to start, then maybe dialog-based app, then finally "real" view windows).

Another choice would be good old Programming Windows by Petzold, it's all about writing windows in C with lots of code samples.

It really helped me start learning (many many years ago) to be trying to do something specific like a card game, or Yahtzee, etc. -- some big goal that forces you to learn all the little parts along the way.
 

singh

Golden Member
Jul 5, 2001
1,449
0
0
One of the best sites for MFC/VC++: CodeProject.

Best way to learn any kind of programming is practise, practise, and more practise. I started with bare Win32 API using plain C. Then I bought one of those 21-days books for VC++. That was my first and last book on MFC. I just learned by messing around with VC and learning by studying sample code. The samples that come with MSDN are also good for beginners.
 

Gaunt

Senior member
Aug 29, 2001
450
0
0
I can't really suggest any books, because I didn't really read any except the intro to Visual C++ by Ivor Horton. :)

What I can offer, possibly, is some suggestions.

First, windows is a complicated beast. It's got a ton of layers to it, and at the top you're looking down on MFC which tends to hide alot of stuff from you. I had a tough time trying to learn to use MFC because of this. Visual C++ took me about 2 years to learn (not actively learning, just bits here and there) after I knew C and some C++.

Build your skills in layers... Try just regular C or C++ first, no windows. Get your hands on Borland C++ 5.02 (or similar) and write console applications that will let you get used to the syntax and the standard set of functions. Once you're comfortable enough to move on, you have two choices... Either of which will be quite a leap from console applications. You can go to the top, and write windows apps using MFC (and learn a small subset of what happens at the lower levels while doing that), or you can learn win32 API and go from the bottom of windows up. Petzold's book, Programming Windows, will help you with this. It is usually considered the "Bible" of windows programming.

I wish I could offer a suggestion on where to get structured examples and lessons. A school course would be very handy for this, because what you are looking for is exactly what they offer. Unfortunately my intro to computer programming course was in pascal, so I don't have any notes to offer you. It might be possible to look around the web and find course material online though. I believe there was a website that offered free courses online. If I find the link later, I will post it.
 

spwango

Senior member
Mar 7, 2001
419
0
0
The total C++ way, I'd suggest:

Go to http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html and get Bruce's thinking in C++ book. Then go to the store and get Jeff Prosise's Programming Windows with MFC to learn VC++ coding.

However, in school, I was tought the following way and it served me well:

1) General C++ console programming (C++ language only, no MFC, no Windows API, nuthin' but C++)
2) Java -- General Java programming and Java GUI programming
3) Advanced C++--MFC, Windows API, etc...programming Windows apps essentially.

Java is a bit more forgiving, so its easier to learn, but a bit of C++ skill to know how to use pointers and such goes a long way in helping you understand the things Java encapsulates for you. Today, I would consider replacing Java with C# as well...they are somewhat similar.
 

ElDonAntonio

Senior member
Aug 4, 2001
967
0
0
I agree 100% with Gaunt. That's actually the way you're taught C++ programming in a computer engineering degree. In fact, unless you absolutely want to program windows apps using MFC, I'd recommend programming on Linux. You'll have all the tools you need, and you can learn to use QT for building interfaces in a much nicer way than with MFC (IMHO). Then when you want to program in windows, you'll still be able to build interfaces using QT Windows, or move to MFC or the Win32 API.
But what's really important right now is for you to focus on the C++ language and mentality before getting into windows. I'd recommend the Deitel & Deitel book, it's the one we used in our C++ class in first year of engineering.