Jump to content
  • Advertisement
Sign in to follow this  
gabrielzheaven

SDL game

This topic is 2707 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

what is meant by bool init()??
i understand all the code that is contained in it..
i suppose bool is boolean which can take only two values i.e. truth or false.....but what is bool init()??...i am confused..

Share this post


Link to post
Share on other sites
Advertisement

what is meant by bool init()??
i understand all the code that is contained in it..
i suppose bool is boolean which can take only two values i.e. truth or false.....but what is bool init()??...i am confused..


That looks like a function prototype, in this case bool specifies that the function init() will return a bool type. Which mean you
can do things like:

if(!init())
{
exit(1);
}




Which will terminate the program if init() returns false.

Share this post


Link to post
Share on other sites
thanks a lot..

[quote name='Michaelangelo' timestamp='1298364822' post='4777446']
what is meant by bool init()??
i understand all the code that is contained in it..
i suppose bool is boolean which can take only two values i.e. truth or false.....but what is bool init()??...i am confused..


That looks like a function prototype, in this case bool specifies that the function init() will return a bool type. Which mean you
can do things like:

if(!init())
{
exit(1);
}




Which will terminate the program if init() returns false.
[/quote]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!