Ух ты! - Оживший юзерпик — LiveJournal
Sep. 9th, 2014
09:40 am - Ух ты!
Before going to the three-day Groovy-sabbath, I was going through some old C/C++ code and came across one of the most brilliant ways to initialize a pointer with an"undefined" value, which would work on a platform where 0x0 is a valid address for data. The code reads:
T* pT = (T*)&pT;
I wonder if they still teach students about fundamentals of this sort. Or do they start with thread pools and dynamic languages, disregarding the basic physics of software development?
Я бы не допёр :)