You are a life saver. after long hours of researching C++ references I couldn't get my hand around it till I watched your wonderful short video lots of love and appreciations
2:05 "That will make sure that's in effect for the rest of the program" What if I want only the following cout line to output fixed precision but the other following couts to output default?
I'm a little confused by these manipulators. What are they exactly? Are they functions etc? The precision seems to require an argument or at least I think so. Then the rest are just called or used like predefined variables.
z is an integer and integers are whole numbers, they do not have decimal points. Show fixed, showpoint and setprecision have not affect on integers. This is why z does not display with a decimal point.
@@lwando2021 you probably already figured it out but for future people who might have the same problem: showpoint by default will show the number in decimal form for up to 6 significant numbers. so 7 would be 7.00000 when fixed is used with setprecision(n) it will show an n amount of numbers after the decimal. so when she did setprecision(0) it showed zero numbers after the decimal.
I wish all professors were like you. Thank you !!
You are very welcome.
Fixed!!! Fudge that’s what was wrong! I was losing my mind!! THANK YOU 🙏 you are a lifesaver!!!❤
You are a life saver. after long hours of researching C++ references I couldn't get my hand around it till I watched your wonderful short video lots of love and appreciations
I'm glad I could help!
Thank you!! Very Good explanation as compared to other videos in UA-cam
Thanks!
This video replaces about 4 pages of textbook explanation and examples that did not make the concepts perfectly clear. Nice work!
Glad it was helpful!
My 2 hours lecture vs this 4 min video...
ty for this simple explanation
I'm glad you liked it.
Great explanation !!!
Life saver big fist pump after this worked. Thank you:)
You're welcome!
Thanks a lot. And btw you sound exactly like selena gomez 😂
there could be more content over formatting output though it is a nice explanation
Thank you it helped me a lot!❤
I'm glad I could help!
Muchas gracias, me salvaste
2:05 "That will make sure that's in effect for the rest of the program"
What if I want only the following cout line to output fixed precision but the other following couts to output default?
Try setting precision to 0 as this will reset to default.
I'm a little confused by these manipulators. What are they exactly? Are they functions etc? The precision seems to require an argument or at least I think so. Then the rest are just called or used like predefined variables.
Good work
how do you make decimals always get aligned no matter what
thanks a lot sir
so how come the "z=10" does not show the decimal point, even though the showpoint command preceded it?
z is an integer and integers are whole numbers, they do not have decimal points. Show fixed, showpoint and setprecision have not affect on integers. This is why z does not display with a decimal point.
Deborah S
What about y? After you set the precision to zero it didn’t show y as 988.0 and you said showpoint makes sure that the zero is not left out.
@@lwando2021 you probably already figured it out but for future people who might have the same problem:
showpoint by default will show the number in decimal form for up to 6 significant numbers. so 7 would be 7.00000
when fixed is used with setprecision(n) it will show an n amount of numbers after the decimal. so when she did setprecision(0) it showed zero numbers after the decimal.
thanks debbie :)
it was helpful
Thank you :)
Thanks a lot
وين اخت الfixed طيب