2 ms·
I'm not a c++ expert, but doesn't char *myChar = 0; std::cout << *myChar << std::endl; // runtime error compile because it's undefined behavior?
by foota 11y ago
I'm not a c++ expert, but doesn't
char *myChar = 0;
std::cout << *myChar << std::endl; // runtime error
compile because it's undefined behavior?
- kevinchen 11y agothe point is that it's a straightforward-looking piece of code that has really strange behavior.