| class Demo { public: Demo(){} ~Demo(){} public: bool getFlag() const { m_nAccess++; return m_bFlag; } private: int m_nAccess; bool m_bFlag; }; int main() { return 0; } |
| class Demo { public: Demo(){} ~Demo(){} public: bool getFlag() const { m_nAccess++; return m_bFlag; } private: mutable int m_nAccess; bool m_bFlag; }; int main() { return 0; } |
| C++数据结构学习:递归(2.2) |
| 浅谈C中的malloc和free |
| C++数据结构学习:递归(3.1) |
| C语言实现MATLAB 6.5中M文件的方法 |
| C/C++中指针学习的两个绝好例子 |
| Symbian应用程序开发1 |
| 跨平台C++动态连接库的实现 |
| C语言程序设计基础之文件 |
| VC简单开发实例 |
| 深入研究 C++中的 STL Deque 容器 |
| void getKey(char* pch) { while (*pch == 0) ; } |
| ; while (*pch == 0) $L27 ; Load the address stored in pch mov eax, DWORD PTR _pch$[ebp] ; Load the character into the EAX register movsx eax, BYTE PTR [eax] ; Compare the value to zero test eax, eax ; If not zero, exit loop jne $L28 ; jmp $L27 $L28 ;} |
| ;{ ; Load the address stored in pch mov eax, DWORD PTR _pch$[esp-4] ; Load the character into the AL register movsx al, BYTE PTR [eax] ; while (*pch == 0) ; Compare the value in the AL register to zero test al, al ; If still zero, try again je SHORT $L84 ; ;} |
| void getKey(volatile char* pch) { while (*pch == 0) ; } |
| ;{ ; Load the address stored in pch mov eax, DWORD PTR _pch$[esp-4] ; while (*pch == 0) $L84: ; Directly compare the value to zero cmp BYTE PTR [eax], 0 ; If still zero, try again je SHORT $L84 ; ;} |
| class Array { public: explicit Array(int size); ...... }; |
| Array arr; ... arr = 40; |
| typedef struct tagDEMOSTRUCT { int a; char sz[10]; } DEMOSTRUCT, * PDEMOSTRUCT; HANDLE hFileMapping = CreateFileMapping(...); LPVOID lpShare = (LPDWORD)MapViewOfFile(...); DEMOSTRUCT __based(lpShare)* lpDemo; |