after a few pages chapter 11 there was a progress check. for the first time I couldn't answer the questions and I decided to look up the answers before continuing.
the problem was I couldn't find them.
Can someone answer these for me and explain them.
1. What is an inserter?
adjustfield
basefield
boolalpha
dec
fixed
floatfield
hex
internal
left
oct
right
scientific
showbase
showpoint
showpos
skipws
unitbuf
uppercase
2. What is an extractor?
3. Why are friend functions often used for inserter or extractor functions?
2. extractor=sscanf,scanf?
3. because enemy functions often fuck up your code and make it all glitchy
I still don't understand 2
but thanks for the explaination of 3.
now wait for BA or why...
Originally Posted by lalakijilp
I still don't understand 2
but thanks for the explaination of 3.
now wait for BA or why...
Hmmm. I never heard of those terms before. What is an insertor or extractor function based on the context of your book? If it's anything like an accessor function then I might know, but it sounds more like a vocabulary word then anything xD.
Originally Posted by why06
Hmmm. I never heard of those terms before. What is an insertor or extractor function based on the context of your book? If it's anything like an accessor function then I might know, but it sounds more like a vocabulary word then anything xD.
I thought an extractor would be sscanf and related functions, you feed it a string and a format(syntaxfuckup + dunno params but something in the direction of sscanf("LOL 55 WUT?! 1337.1337 ROFL", "LOL %d WUT?! %f ROFL", firstint, secondfloat))
Originally Posted by why06
Hmmm. I never heard of those terms before. What is an insertor or extractor function based on the context of your book? If it's anything like an accessor function then I might know, but it sounds more like a vocabulary word then anything xD.
page 1-10 and it isn't explained in simple English so I don't fully understand everything.
found it -.-
ctrl+F inserter
The operator functions that overload the insertion and extraction operators are generally called inserters and extractors, respectively.
But that doesn't explain the table below question 1.. what do you have to do with that?
Yeh I figured out your problem. First off... this is a table which is different from the list you posted.
Secondly this makes no sense. which means you should not care about it.
That's right. it doesn't matter. Just remember this means insert << and this means extract >>. I have no idea what they are trying to do by showing us a table of random function names o_O... and it does not matter because we learned what was important and the rest is there to confuse you.