2 ms·
The hardest part of C++ are it's lifetime rules, which are in fact extremely difficult to grasp. There's essentially a unique(ish) ruleset for each class of obj
by rfgplk 29d ago
The hardest part of C++ are it's lifetime rules, which are in fact extremely difficult to grasp. There's essentially a unique(ish) ruleset for each class of object and misinterpreting one of them (no matter how obscure) can easily cause UB.
see
https://en.cppreference.com/cpp/language/lifetime https://en.cppreference.com/cpp/language/lifetime