3 ms·
Sure. C++ has initializers ({1,2,3}), it just doesn't have C99 designated initializers ({.a = 1, .b = 2, .c = 3}). This is one of the main pain points around
by loeg 8y ago
Sure. C++ has initializers ({1,2,3}), it just doesn't have C99 designated initializers ({.a = 1, .b = 2, .c = 3}). This is one of the main pain points around C++ not being a true superset of C.
- hedora 8y agoG++ actually says “sorry” when it bails on that. The other (bigger) pain point is that malloc returns void*, and C++ requires a cast.