Tuesday, July 14, 2009

I'm good in C++ but, when i start working in VC++, I get confused.?

There are a lot of 'wires' in vc++, as well as new stuff, which i never learned in a C++ courses. These are like 'DYNCREATE', 'MESSAGEMAP', and many other weird identifiers! What are those means and how to build the GUI applications like in the VB? I've tried MFC appWizard but that's just a rough. What about importing and editing more complicated components like database objects in such a large-scale systems?


How to make activeX objects functioning? I've tried ones but it comes out nothing.

I'm good in C++ but, when i start working in VC++, I get confused.?
I personally think you should try Borland Builder C++, it's as intuitive as VB and as powerful as C++ too bad it's not as popular as VC (people think that just because microsoft wrote it it must be good)


I've used all of them but it's been too long and actually if I had a choice and I was in your shoes, I'd go for learning Visual Studio.net and C# because really that it's any better than C++ but unfortunatelly chances are that it will be much more in demand in the future.
Reply:Every OS provides a series of libraries that allow for the fine-grain control of a program's behavior. C++ is the nut-n-bolts layer of programming compared to VB's more drag-n-drop interface. Both are useful, and can even be used together.





Windows offers several libraries to allow you to control things at a detailed level, as does Linux and Apple.





What you are seeing in this C++ code is that C++ is just a syntax specification. The meat behind all the VB code is actually similar to this you're now working at a lower level. This gives two things: power and responsibility.





You can still write "start from a blank page" C++ code inside visual studio, at least for a command-line application. The settings of the compiler are a bit different, but one your learn that, you can write C++ just as if it were on a *nix-style text-based interface.





With C++ on any platform, you have the power to control you application exactly as you wish. You also have the responsibility to learn what these libraries are and how they're used.





There's too much to teach all of windows C++ (v6 or .net) here in yAnswers, but if you begin with a few books or reading in MSDN, you will slowly grasp it. Remember, the first book you read is NOT the definitive way to do things (although many books are sold with that premise). You must reference several sources to ensure you have a well-rounded viewpoint on how to write code in complex environments.





Overall, simply use the tutorials for simple applications, then read each line and look up each keyword, macro, variable or class you don't understand. PLAY with the code, read the header files, and follow several tutorials without skipping ahead. This tedious investment will give you a great base to start writing your own.





If you're just starting, try learning C# - it's almost identical syntax but hides many of the lower details again. You get almost the best of both worlds VB and C++.
Reply:If by being good in C++ you mean you only know (athough well) to make console programs, you will indeed get confused, because Windows apps are very different. If that's the case, I would try to find a good tutorial first. Also know that there is a difference between normal Winapi apps and MFC ones. If you want something VB style, learn to make MFC apps, they are more "visual".





BTW VC++ is, in my opinion, the best C++ IDE.








About the database component things, I don't know, last time I needed a database I simply used CDatabase MFC class to connect to it.

survey

No comments:

Post a Comment