Advertisement

problems with winmain

Started by May 19, 2000 09:24 PM
14 comments, last by ARCHIGAMER 24 years, 7 months ago
VC++ keeps on saying that it is missing a function header for WinMain. ;Here is my code: int WINAPI WinMain( SpInstance, NULL, SpCmdLine, WS_SHOWMAXIMIZED); { It appears that the open brace seems to be what the VC++ is choking on and I have tried many things. could someone be kind enough to clear this up?
I wish there was a button on my monitor to turn up the intellegince. Theres a button called 'brightness' but it doesn't work
Take out the semi-colon after the end parentheses
Advertisement
that doesnt work either
I wish there was a button on my monitor to turn up the intellegince. Theres a button called 'brightness' but it doesn't work
Go read a book on programming, or go to school. You don't understand even the simplest bits of what you're doing in C.

This is not meant as a directed attack against you, as such, just the current mentality of people trying to build ships before they've learned to talk.

Edited by - TheTwistedOne on May 20, 2000 10:32:37 AM
TheTwistedOnehttp://www.angrycake.com
Are you trying to call WinMain or declare WinMain?

If you''re trying to declare a WinMain function why are you trying to pass parameters to it? You need to specify the variables and types for the functions, not give actual values.

If you''re trying to call WinMain, first off, why? Second off, why do you have a code block after it?
I kinda agree with TheTwistedOne... you''re code seems to be a mix of a function call, a function prototype and a function definition... maybe you should read a book first?

Before you started mucking with the win32 api.

Before I even touched TOTWGPG I''d read 2 other books(on ANSI C++), and bought a big reference book... before that I already knew programming fundamentals coming from both VB and JS, and I still most definitely consider myself a novice in game development

------------------------------
YOu were expecting something funny, weren't you!
J2xC (J. Connolly) Ah! By popular demand, I shall no longer resist...
Advertisement
i have been stuying c/c++ for 6 months i have read 3 books on it. i just have been trying to at least make a window
I wish there was a button on my monitor to turn up the intellegince. Theres a button called 'brightness' but it doesn't work
also i have the winmain prototype out of the win32 help file in functions.h. i have included windows.h windowsx.h.
I wish there was a button on my monitor to turn up the intellegince. Theres a button called 'brightness' but it doesn't work
ok, i''ll help you out.. i remember learning all that and typing in sample programs and compiling (though i had no idea how they worked) and the feeling it gave me.. that it is possible to do those things, and that i''ll be able to learn how.. sorry for being sappy..
but i strongly recommend that you focus more on C++ fundamentals before diving into Win32 in earnest.. if you''re lucky, it''ll just give you a terrible headache..
declare WinMain() like this:
int WINAPI WinMain(HINSTANCE hinstance,                    HINSTANCE hprevinstance,		   LPSTR lpcmdline,                   int nshowcmd) {    //code here}
Is that so? Well, when I found out about DirectX, just about 4 months ago, I knew NOTHING about Win32 programming. I wasn't even too comfortable with normal C. On my birthday (January, I turned 13), I saw the book "Sams Teach Yourself DX in 24 Hours" and bought it. WHAT A DISCOURAGEMENT. I banged my head against the book and realized I knew nothing this book was talking about. Just about 2 months ago, I decided to open the book and give it a try, reading everything even though I knew nothing about it. I copied all of the source code and every thing worked. I then heavily searched for Win32 tutorials on the net and found a short one that showed the Win32 part of DirectX. That is when everything got easier. Now, I knew enough to start programming in DirectX. Right now, I'm still learning, but my knowledge on Win32 is pretty much still blank.

Remedy@icestorm.net

Edited by - Remedy on May 20, 2000 11:19:05 PM
Remedy

This topic is closed to new replies.

Advertisement