Comment on: Help for C++ beginner? Cannot declare long int
1 16 Aug 2015 07:55 u/ROCKduhHOUSE in v/programmingComment on: Help for C++ beginner? Cannot declare long int
Interesting. At least there's a reason, even if it doesn't make much sense at first to newcomers. My instructor is on a Macintosh (I guess he isn't using MinGW, he was just encouraging Windows users to use it because it's just the Windows version of what he uses), so I understand why he never had this problem or thought to tell us a way around it. Thanks for the help.
Comment on: Help for C++ beginner? Cannot declare long int
Excellent help. I guess that "int" declares a long integer by default? Interesting. I did know about unsigned, but he wanted us to test different integer types and see how they worked, and one of the ones he wanted was long integers. I was avoiding using unsigned until I could figure out what was wrong with long.
Using "long long" worked, and it now displays the correct information. Thanks.
Maybe in later days, but right now I'll continue at the pace the instructor sets so as not to confuse myself. I hear later parts of C++ are confusing to learners as-is. It's nice to know such things do exist, though, and I will likely put those to use either later in the course or after the course is over. Thanks for the recommendation.