i was on a power trip. I had to make a guessing game program for a class to learn about if statements and i said hey. what if i dont use any if statements. or try except. or arrays/maps. and just kept on adding absurd conditions to the challenge
my solution was to use a uint16 as a pseudo-bitarray and use an absurd amount of boolean logic
I think I’ve got it; just need to play 20 Questions with Java.
there were numerous ways I could “take the easy way” but i kept on refusing and got sad when I found more. mostly because I’d use them to fix one problem and realise I could use them to fix All Problems
i can send you the resulting code if you want
i was originally building it off java as that was what i was learning but java is fucked up and booleans cannot be converted to fucking ints without a conditional. So I decided I’d learn c++ Just For That
like yes, technically I could print everything using the string.repeat trick. which is why I banned the string.repeat trick. so instead i ended up using string.substring. and realising I had just did the same thing and at that point I just went with it
the trick to take input only in specific situations is fucked though like that shit is insane
eliza bestie i dont understand why you like my posts sometimes
skill issue
std::cin.ignore(std::numeric_limits<std::streamsize>::max() * printQuestion, '\n');
std::getline(std::cin, fourStr);
what was she cooking (I do not remember how I came up with this)
iirc this only works with getline. this doesnt work with your standard std::cin >> x deal. at least not exactly
Cin by default ignores and removes the leading whitespace but getline does not ignore the leading whitespace on its own.
this is why i think. because of this interaction using cin normally and then getline will leave whitespace that getLine will pick up, but i can ignore it to take input normally. If I ignore nothing by multiplying it by 0, it just ignores nothing, takes the newline and nothing else, and continues on
This thread
>engineering
Ok, good news, bad news.
Good news is that I got the chicanery working.
Bad news is that the chicanery doesn’t work.
It ultimately comes down to this fundamental issue.
We have to jump from 8 to 10 and somehow hit 9 in the middle on an infinitesimally small platform.
This is a new kind of May…
May!
They’ve added a whole new dimension to May
We’ve updated our May experience