Hi friends, I am studying C++ and have been practicing with a console app.
At one point when doing some calculations with the app, I realized that my variable will not store a number more than 6 digits.
I am using a long double variable.
According to my literature, I thought it should work no problem, so I do not know what I am doing wrong, or what is limiting it from displaying correctly.
It will store 999,999 and print it out correctly no problem, but if it goes to 7 digits, it will not print out the accurate number but instead it is like it scrambles and adds letters and symbols into what it prints out.
Instead of displaying 1,000,000, it instead displays "1e+06".
I checked the Microsoft Windows Calculator app to see how many numbers it can store and display, and it holds up to 16 digits, but when it hits 17 digits, it appears just like my scrambled numbers.
Anyway, thank you for taking the time to read my question, and I appreciate any guidance! :]