-
Beginners Programs
Yo...
I just started programming in C++ a few weeks ago. I already know about IF statements, loops, variables, and some other small stuff. But what can I put together in a Windows App with this? I'm really confused, I dont want to have to wait a few years to learn to make a program. What useful stuff can be made with my limited knowledge?
-
No...not a windows app....you can try making a DOS text-based game..like text-based tic-tac-toe.
-
MonkFish,
When I first started out I was making simeple win32 console apps that would help me with simple tasks. I made a small timer app that would just count down from whatever time I gave it. Then I made a simple program that helped me with my checkbook. It all depends on what you want to do personally. When I wanted to be able to make a text game, I had to learn about reading from ini files and the registry, so I could store user prefernaces and such. Just pick something you want to make, then try to make it, asking for help along the way.
-
I would recommend getting a DOS compiler and starting off there. Dos is fun and easy to program for but waaaaaay limited in many areas. After you think you have a firm grasp on c++ syntax go ahead and move on to windows, opengl, whatever you want to do.
-
>>I'm really confused, I dont want to have to wait a few years to learn to make a program.
Unless you are some super genious, this is what it takes. And you said I'm really confused, so it could be a while.
I have been programming for 2 years now and have finaly made my first "real" windows program. It just takes time and effort. The more time you spend learning the better programmer you will be plus the shorter time it will take you to creat a "real" program.
-
I..
I went straight from after learning pointers, etc. to Windows Apps. It only took me about 10 days to get the basics such as GetDlgItemText, how to make text boxes, buttons, etc. Try going to http://msdn.microsoft.com/library/de...tart_88bp.asp/
-
yeah, ken knows first hand what happens when a newbie trys to learn Win32 before DOS, just ask him :)
-
To make a "simple" window requires about 70-100 lines of code, so it's not a walk in the park to create a fully fledged program. Even creating a text editor (like notepad) takes a bit of effort. But it is heaps easier to understand Windows programming after doing some C/C++ programming for a while. You will eventually have to learn some C anyway, as both Win32 API programs and MFC are based on C.
Code:
// Demonstration of a simple message box
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "Good Luck :)", "Message", MB_OK);
return 0;
}
-
I agree with everybody that you should not start with win32, but if you want to, here's my advice
It would really help if you knew Visual Basic first, because you can get a good idea of how windows objects work, after that, try reading any simple program, copy what you need and start messing with it, the program I first used to learn Win32 programming is the first DirectX 7.0a tutorial, I know it could be tough to understand all that DirectX, but never mind it, just copy the windows code there is, I learnt with that.
Good luck
Oskilian