So, I\'m working on a C++ project. I have a var of long double type and assigned it a value like \"1.02\"
Then, I try to use cout to print it and the result is: -0>
It seems to be a problem with compiler. Take a look here: http://mingw.5.n7.nabble.com/Strange-behaviour-of-gcc-4-8-1-with-long-double-td32949.html
Use printf or convert a value of your variable to double before passing to cout. (BTW are sure you need 80-bit precision?)
printf
double
cout