Sign in to follow this  

SDL game

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

[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..
[/quote]

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:
[code]
if(!init())
{
exit(1);
}


[/code]

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

Share this post


Link to post
Share on other sites
thanks a lot..
[quote name='prh99' timestamp='1298365470' post='4777452']
[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..
[/quote]

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:
[code]
if(!init())
{
exit(1);
}


[/code]

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

Share this post


Link to post
Share on other sites

This topic is 2491 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this