Monday, May 24, 2010

C++, what am i doing?

Hey guys,


I've been learning a lot about C++ programing


lately, [i got the for dummies book, lol XD]


and i've been trying to figure out:


All the programs i've created so far run


through the console...


In my compiler [Dev-C++] it gives you the option


to create a windows application as well,


and when i looked at the .cpp for it, it was gibberish.





Is that still coded in C++? and if so,


where do i learn how to program it?





10pts for a good answer XD

C++, what am i doing?
Yes, its still C++, but when you get into GUI programming, much of the work is done with object libraries.





To get an idea, Visual C++ has a tutorial of what you have to do to get a simple "hello world" GUI going. Its a lot of code. The Ojbect libraries help a lot to minimize the work you're doing.





Also, if you're looking at Visual C++ code, you might be looking at MFC, which uses Macros. A Lot. Which makes the code look almost alien.





Once you know what the macros mean, you'll see they do turn into library calls, which is just plain old C++





Best of luck.
Reply:The Windows application is when the program talks to the Windows operating system itself. The syntax and programming is still, however, C++. (Same operators for math, strings, etc). I learned Win32 quite easily from


http://www.functionx.com/win32/Lesson01....


That site goes from making a window to making a simple game. The Win32 API is generally used for getting input for graphical user interfaces (instead of the plain black command prompt). It supports making shapes, showing images, and getting mouse/keyboard input. It also provides ways of altering processes (Videogame hacks for example). Some useful libraries in Win32 are:


kernel.h (Control processes and other important stuff)


Winsock.h (Networking)


Windows.h (Has almost everything).


If you know Win32, you can basically do everything other than full fledged video games on windows. (Then you can learn DirectX and do everything). Good luck :)


(Note that the tutorial uses Borland, for Dev C++, just ignore all the things that start with # that are not #include or #define.


No comments:

Post a Comment