« first day (1231 days earlier)      last day (1846 days later) » 

08:58
Hello
09:35
What's best way to calculate floor of square root of an unsigned long long?
sqrtl in cmath?
 
3 hours later…
12:14
@DemCodeLines See stackoverflow.com/questions/5171502/… and the duplicates.
 
4 hours later…
15:51
int reverse(int x) {
        int rev = 0;
        while (x != 0) {
            int pop = x % 10;
            x /= 10;
why are you allowed to x !=0?? Surely x will always be 0.0000456 say, ie a little bit left eventually
16:07
@Permian because it's an int and thus can't ever be that?
you are a genius
thanks
no I'm captain obvious at the moment, someone else will wear the cap tomorrow
haha
but wait, is there some implicit rounding going on
FWIW std::div gives the remainder and the quotient at the same time
ok
i dont like this notation to be honest
16:17
hmm?
17:06
im trying the check an integer is palindromic question in leetcode. My solution doesnt work. Can I paste it here?
17:18
typedef struct a {
    default_t item;
    default_descriptor(default_t i) :
        item(i)
    {}
} a_t;
What does the part after the colon do?
Is this supposed to be a class implementation where when you call "default_descriptor" and pass it i, it will assign it to item?
nwp
nwp
17:38
Yes
It's one of the meanings of "initializer list".

« first day (1231 days earlier)      last day (1846 days later) »