Jump to content
  • Advertisement

Archived

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

variable declaration

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

Advertisement
It means that you are declaring two variables (''choice'' and ''i'') of type ''int''. It is a short-hand way of writing:

int choice;
int i;

Share this post


Link to post
Share on other sites
It is declaring two integer variables, with names choice and i.

Be careful with this syntax if you want to declare multiple pointers in one line i.e.

int * choice, i;

does not declare two pointers, but one called choice, the other an integer, i, however:

int * choice, * i;

does declare two integer pointers.

Share this post


Link to post
Share on other sites
wow, I cannot believe that I forgot what that meant. I learned that a long time ago.

sorry for asking such a stupid question

thanks for the responses though.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!