- 博客(19)
- 资源 (8)
- 收藏
- 关注
原创 在CE系统中通过程序开启 屏幕背光
void KeepBacklightOn(){ OSVERSIONINFO osVer = {0}; osVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&osVer); if (osVer.dwMajorVersion { // Wi
2011-11-11 12:55:32 327
原创 Windows调试之内存泄漏
查找内存泄漏的重要性我想就不必多说了,言归正传!发生内存泄漏的简单c++程序#include using namespace std;int main(){ cout const int BUFER_SIZE = 10; c
2011-09-08 11:58:30 291
原创 Software Design Specification Templates
[Project ]SoftwareDesign SpecificationCxTemp_SoftwareDesignSpecification.docDraft XMay 13, 2011[ Organization Name ][ Paste Your
2011-08-15 11:08:33 677
转载 Counting Objects in C++
Counting Objects in C++By Scott Meyers, April 01, 19980CommentsIt isn't hard to keep a count of all the objects allocated for a gi
2011-07-05 08:37:26 283
原创 VIM使用系列之一——配置VIM下C/C++编程环境
作者:gnuhpc from http://blog.csdn.net/gnuhpc 本文环境:ubuntu 9.101.基本配置建立三个目录:mkdir ~/.vim/{plugin,doc,syntax} –p建立配置文件:touch ~/.vimrcvimrc作为vim的主要配置文件,我们在配置VIM时首先对它进行基本的设置。打开你home目录下的.vimrc文件。进行如下配置:"基本配置s
2011-07-02 16:19:35 461
原创 Prefer const, enum ,inlines to #defines
/* * File: main.cpp * Author: qzhao * 这个章节是关于在进行C++日常开发的时候,尽量使用const 或者enum 取代传统的C define 宏, * 宏是提供给预编译器,来进行简单的文本替换 * 但是C++ 推荐采用const 或者 enum 变量定义. 直接让compiler 来帮忙检错。 * just as “perfer the compiler
2011-07-02 15:36:39 353
原创 When to use explicit keywork for class construct
/* * File: main.cpp * Author: qzhao * * Created on 2011年7月2日, 上午8:12 *//* * 对构造函数,进行显示声明,是为了避免隐式转换, * */#include #include using namespace std;class A {public: explicit A() : value(0) { }priv
2011-07-02 15:34:56 200
转载 Inside CRT: Debug Heap Management
When you compile a debug build of your program with Visual Studio and run it in debugger, you can see that the memory allocated or deallocated has funny values, such as 0xCDCDCDCD or 0xDDDDDDDD.
2011-06-24 08:43:00 357
原创 Templates and multiple-file projects
From the point of view of the compiler, templates are not normal functions or classes. They are compiled ondemand, meaning that the code of a template function is not compiled until an instantiation w
2011-06-18 00:25:00 217
原创 Implict conversion in template class
C++ complier are very clever, it can auto try implict data types ( for plain old data ); Predict the output of the flowing codes: #include using namespace std; //get the larger of two v
2011-06-17 23:55:00 415
原创 程序入口函数和glibc及C++全局构造和析构
1,程序入口函数和初始化 操作系统在装载可执行文件后,将把控制权交付给运行库的程序入口函数。 因此,程序首先运行的代码并不是main函数,而是负责为main函数执行创造环境,并负责调用main的入口函数(Entry Point)。main函数返回的值也会被这个入口函数所记录,然后调用atexit注册的函数,最终结束进程。 这样,程序的执行流程如下所示: 1,操作系统内核加载
2011-06-15 17:45:00 593
原创 C++ default constructor | Built-in types
Predict the output of following program?#include using namespace std;int main() { cout << int() << endl; return 0;}A constructor without any arguments or with default values fo
2011-06-15 12:41:00 327
转载 How will you print numbers from 1 to 100 without using loop?
Here is a solution that prints numbers using recursion.Other alternatives for loop statements are recursion and goto statement, but use of goto is not suggestible as a general programming practice as
2011-06-15 08:49:00 361
原创 Conversion Operators
In C++, the programmer abstracts real world objects using classes as concrete types. Sometimes it is required to convert one concrete type to another concrete type or primitive type implicitly. Conv
2011-06-14 19:56:00 215
转载 Difference Between ADDR and OFFSET
<br /><br />In the initial days when I started writing assembly programs on my own I used to get confused as to when to use ADDR and when to use OFFSET in the program. This article is an attempt to clear the doubts of assembly programmers regarding the mea
2011-05-23 10:45:00 233
转载 探讨STOS指令
转载在http://hi.baidu.com/darks00n/blog/item/4c019ec42ad0cdcad00060b1.html下面是一段win32 console程序(Debug版)的反汇编代码,很程式化的东西。本文不讨论这段码的具体作用,而是来学习下stos指令。stos((store into String),意思是把eax的内容拷贝到目的地址。用法:stos dst,dst是一个目的地址,例如:stos dword ptr es:[edi]。dword ptr前缀告诉stos,一次拷贝
2011-05-17 18:15:00 581
原创 制作Cab包
<br /> 如何不提示安装路径<br />默认情况下,通过VS工具制作安装包都会默认在实际安装cab包文件是植入安装路径,如下图所示<br /> 对应的Cab安装信息文件.inf (它是做安装cab包最关键的配置文件,请参考 cabwiz.exe)中会定义InstallDir变量 。<br /> [CEStrings]<br />InstallDir=%CE1%/%AppName%<br /> <br />如果去掉InstallDir定义,然后制作cab包就不会提示选择了。<br /
2011-04-18 10:39:00 353
Latest C++ standard – working draft section 8.5
2011-06-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人