//First, how should you translate flags into a understanble language? They could call them like iosettings or iotools, right? Why "they" call "them" flags?
//Second, what are the differences between flags() and setf()?
//First, how should you translate flags into a understanble language?
Basically you would check the bits for either a 1 usually to represent a on and a 0 for an off, depending on the state of the bit you perform a certain action.
Something like if(bit is on) then drop a coke from the vending machine. if (bit is off) nobody paid for the soda don't give it to them.
They could call them like iosettings or iotools, right? Why "they" call "them" flags?
They are called flags because the represent a marker much like a the American flag on the moon does, we are Americans and we own the moon :P. And well because that just easier. iosettings or iotools make them a bit more cryptic in my opinion.
Slightly more seriously. the idea is that a flag is a signal. If the flag is raised, it means one thing, and if it's lowered then it means another. That's analogous to a boolean value - if the value is 1, then it indicates one thing, and if it's 0 it means another.
It's a bit of jargon that crept into the programming vocabulary decades ago.
Ok. Thank you to y'all. One thing: is there a stream manipulator or a cout function that centers the output in a certain width we decide? There's a the stream right and left manipulator, but I didn't found the center one. And what internal manipulator does?
And also: why isn't there a stream manipulator or a cout function to have the lowercase: as we have the uppercase manipulator, it seems quite unlogical.
And also: why isn't there a stream manipulator or a cout function to have the lowercase: as we have the uppercase manipulator, it seems quite unlogical.
It's a flag that can be either on or off. Would it makes sense to be neither upper nor lower case, or both at the same time?
// I think that there should be an lowercase manipulator, that when it is on the uppercase, ofc, becomes off, and viceversa, is unlogical that it doesn't exist. And do not be offended because there's no one.
// I think that there should be an lowercase manipulator, that when it is on the uppercase, ofc, becomes off, and viceversa, is unlogical that it doesn't exist. And do not be offended because there's no one.
Did you click that link? There is a std::nouppercase, and JLBorges even posted it more directly than me.
// I think that there should be an lowercase manipulator, that when it is on the uppercase, ofc, becomes off, and viceversa, is unlogical that it doesn't exist. And do not be offended because there's no one.
please keep clarity in mind what are you actually on about?
I thought this manipulator could be used to all kind of output, but instead it is used just for floating-points and hexadecimal. Why?
Because it has to be either on or off, which would mean that your string output would always be either all lowercase or all uppercase. Instead, you the programmer are expected to format the strings you output yourself. Converting strings to all lowercase or all uppercase is trivial: http://stackoverflow.com/a/313990/1959975
And I am still thinking that should be an lowercase anyway!
What you said doesn't prove that couldn't exist a lowercase manipulator!
You are trying to excuse the C++, but actually C++ defects, unfortunately :(
And I am still thinking that should be an lowercase anyway!
What you said doesn't prove that couldn't exist a lowercase manipulator!
You are trying to excuse the C++, but actually C++ defects, unfortunately :(
What you are asking for is a redundant way to do something that can already be done easily. The C++ standards committee does not consider this a defect of the language. If you want, you can search for the full list of defects in C++ and see for yourself.