Just wondering, how high can c++ really count? Because I made a fibonacci program, and it starts acting weird and printing negatives at about 10-11 places. With both long, and int variables? Is it impossible to count higher? If not, how?
valestrom
17
Junior Poster in Training
Recommended Answers
Jump to Postit can go as high as you need it to go. there is no limitation. even if hardware limitations are exceeded, ye' can still use a net based resource, which is limitless.
Jump to PostIt's based on the type of the variable. They each have their limits.
Jump to PostYou can extend your range by using unsigned integers, since your numbers aren't going to be negative.
All 11 Replies
Clinton Portis
211
Practically a Posting Shark
valestrom
17
Junior Poster in Training
Zssffssz
-4
Junior Poster
Chilton
22
Junior Poster
valestrom
17
Junior Poster in Training
Chilton
22
Junior Poster
Zssffssz
-4
Junior Poster
mike_2000_17
2,669
21st Century Viking
Team Colleague
Featured Poster
Clinton Portis
211
Practically a Posting Shark
L7Sqr
227
Practically a Master Poster
Clinton Portis
211
Practically a Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.