Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Problem with functions with C++... moving from DBPro to GDK

Author
Message
Ekko
20
Years of Service
User Offline
Joined: 27th Apr 2004
Location:
Posted: 8th Jul 2009 22:57
Hello,
I haven't used C++ for a few years now and I'm moving over from DBpro to GDK. I'm trying to get used to the syntax again but when modifying the default 3D game project I ran into a small problem. The only thing I changed was putting the code to make the objects into a function:


For some reason I only get a black empty window. What am I missing? Please explain. Thank you!
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 8th Jul 2009 23:00
When you do this:



you're not actually calling the function, you're just declaring it. You should take that declaration out of the DarkGDK() function and add this:



So you're new code would look like this:



i like orange
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 8th Jul 2009 23:04 Edited at: 8th Jul 2009 23:06
Beaten.

An excellent site for learning or brushing up on C++:
http://www.cplusplus.com/tutorial

Your_Health = (My_Mood == HAPPY) ? 100 : NULL;
Ekko
20
Years of Service
User Offline
Joined: 27th Apr 2004
Location:
Posted: 8th Jul 2009 23:15
Silly mistake. Thanks Andrew! and Thanks Bran; I'll be referring to that site over the next few days!

Login to post a reply

Server time is: 2024-11-25 06:32:57
Your offset time is: 2024-11-25 06:32:57