03 2009 档案

摘要:Debugging Tools fo Windows From MS: http://www.microsoft.com/whdc/devtools/debugging/default.mspxhttp://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx#aNote:It includes Gflags, which is a p... 阅读全文
posted @ 2009-03-31 13:53 能巴 阅读(227) 评论(0) 推荐(0)
摘要:Threading safety means: multiple threads can call the same method at the same time without corrupting your data/resources如果你的代码所在的进程中有多个线程在同时运行,而这些线程可能会同时运行这段代码。如果每次运行结果和单线程运行的结果是一样的,而且其他的变量的值也和预期的是一样的,就是线程安全的。 或者说:一个类或者程序所提供的接口对于线程来说是原子操作或者多个线程之间的切换不会导致该接口的执行结果存在二义性,也就是说我们不用考虑同步的问题。 线程安全问题都是由全局变量及静 阅读全文
posted @ 2009-03-17 11:43 能巴 阅读(485) 评论(0) 推荐(0)
摘要:Since Struct and Class are almost the same thing, I will just talk about one of the two. Let's talk about struct ba. There are three kinds struct: 1. Only contain data member without functions. 2. hav... 阅读全文
posted @ 2009-03-04 22:58 能巴 阅读(402) 评论(0) 推荐(0)
摘要:Whitespace : In computer science, whitespace is any single character or series of characters that represents horizontal or vertical space in typography. When rendered, a whitespace character does not ... 阅读全文
posted @ 2009-03-02 22:18 能巴 阅读(265) 评论(0) 推荐(0)
摘要:In c++, we should keep using c style union. Although c++ union supports constructor, we'd better not use it. Actually, no need to use constructor for union basically. Going deeper, even as the expande... 阅读全文
posted @ 2009-03-02 22:14 能巴 阅读(268) 评论(0) 推荐(0)
摘要:How to Organize solution and projects On solution level: there is Solution Folder to organize projects to be different groups which is logically organized, not physically (on disk);The logical relatio... 阅读全文
posted @ 2009-03-02 22:06 能巴 阅读(229) 评论(0) 推荐(0)
摘要:Preprocessor directives can appear anywhere in a source file, but they apply only to the remainder of the source file. #error:Error directives produce compiler-time error messages. #if !defined(__cpl... 阅读全文
posted @ 2009-03-02 21:56 能巴 阅读(286) 评论(0) 推荐(0)
摘要:Exporting from a DLL A DLL file has a layout very similar to an .exe file, with one important difference — a DLL file contains an exports table. The exports table contains the name of every function... 阅读全文
posted @ 2009-03-02 21:50 能巴 阅读(285) 评论(0) 推荐(0)
摘要:LoadLibrary HMODULE WINAPI LoadLibrary( __in LPCTSTR lpFileName ); Return Value If the function succeeds, the return value is a handle to the module.If the function fails, the return value is NULL. To... 阅读全文
posted @ 2009-03-02 21:29 能巴 阅读(671) 评论(0) 推荐(0)
摘要:在编写程序的时候,我们经常要用到#pragma指令来设定编译器的状态或者是指示编译器完成一些特定的动作。 MSDN: Each implementation of C and C++ supports some features unique to its host machine or operating system. Some programs, for instance, need ... 阅读全文
posted @ 2009-03-02 12:06 能巴 阅读(256) 评论(0) 推荐(0)