• Advertisement

Archived

This topic is now archived and is closed to further replies.

Is this supposed to teach me?

This topic is 5957 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i just d/l the red book is this book supposed to teach me or just be a reference? im seeing main() being used and i thought main was only for dos now i know some OGL and the beginning chapter does nothing to teach me so back to my beginning question, is it a reference or a way to teach ppl? "Those who serve no purpose, have no purpose"

Share this post


Link to post
Share on other sites
Advertisement
every program in C/C++ has a main function, it''s not only for DOS. if you want to learn there are many books and tuturials on the internet.

Share this post


Link to post
Share on other sites
The "main" function is the standard function for all C and C++ programs to begin with, not just DOS. It just happens that the Win32 API has its own main function that sets some stuff up before calling your WinMain function. The Red Book is more reference-ish than many books, but it is meant to teach you (I personally like the reference side of things, so it is a very good book in my opinion ).

[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
main() is the standard c/c++ entrance for apps. The only reason you start with WinMain is that there''s a function that looks something like this linked into ever win32 app:

int main(){
//Gets hinstance, etc
return WinMain(hInstance, hPrevInstance, lpStr, nShowCmd);
}

This isn''t exactly it I think, but if you really want to you can trick it into using your main instead of it''s main. Waste of time, though. Just use WinMain.

Share this post


Link to post
Share on other sites

  • Advertisement