3 ms·
This is a great example of how many of the things in C that don't compile in C++ are horrible programming practices, and it's really nice that C++ doesn't allow
by Chromozon 9y ago
This is a great example of how many of the things in C that don't compile in C++ are horrible programming practices, and it's really nice that C++ doesn't allow such garbage.
- magnusjonsson 9y agoActually those are very bad examples. In practice, compilers will produce warnings in all of those examples. Better examples (of actually useful things) would be things like designated initializers, struct literals, declaring array lengths in args using static, etc.
- milesrout 9y agoI don't see what is 'horrible programming practice' about int *x = malloc(sizeof(int));