1. 进程退出时,操作系统会回收该进程所占用的所有资源。所以不需要担心内存泄漏。(这点是可以理解的,因为用户程序,难免有bug,假如进程退出不回收内存,那操作系统不是很容易挂掉吗?这是不能容忍的)2. exit()函数的也并不是完全不调用析构函数。参考ISO C++ 2003标准:static对象是会被析构的,auto对象不会析构。...【阅读全文】
Write a C function to swap the bits of a unsigned char so that its bits become the mirror image of the char. MSBs become its LSBs, e.g. 01111000 binary should become 00011110 binary. 方法一:(最最容易想到的办法)unsigned char ReverseBitsInChar00(unsigned char&nb...【阅读全文】