Message from C, C++ talks

June 2019

— Fuc*** hell.

— Never seen such a thing in real code

— 😆

— I've heard of it, but never saw it either.


Maximum two, when someone wants to pass a pointer to a C-array. To allocate it in the function and return the pointer via parameter

— But three asterisks sound a little bit insane. Can't imagine why someone would do that

— Well, two already too bad in my opinion

— But I guess its how things being done in pure C (glad that I'm not doing pure C)

— Kind of, multiple function invocations would share the object. To access the object outside of the function you need a pointer.

Message permanent page

— Multi dimensional arrays

— Oh, so to have 3d array of ints, you need to do this int***?

— Well vector<vector<vector<...>>>> doesn't sound much better, but at least it's safe :)

— But memory-unpredictable

— I think at least the same predictable as with C arrays

— I still didn't understand why do we need to flush the buffer.