Jump to content
  • Advertisement
Sign in to follow this  
Dakar

Variables

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

Just a short question: Is it possible to define a variable with xyz bytes? I want to make a program that deals with a very large number, but normal integers just don't go that far. :( Thanks, ~Dakar

Share this post


Link to post
Share on other sites
Advertisement
If you're using Java, there's a class that handles just what you speak of BigInteger, I believe.


FOR C/C++:

Also, you can use a dynamically allocated array with each element being an integer if you need a huge amount of space. You can also store the integer in a regular array, also.

If you do either of the above, you'll need to create a function that stores and retrieves the information within the array.

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!