流云の剑舞秋风

吾生也有涯 而知也无涯

博客园 首页 新随笔 联系 订阅 管理

2005年5月8日 #

摘要: 全局变量的定义一直不知道怎么弄,困绕很久,终于在vckbase之阿荣的BLOG上找到答案了 http://blog.vckbase.com/arong/archive/2004/05/28/294.aspx 简述如下:工程中有xx.cpp,yy.cppxx.h,yy.h等,在xx.cpp里的函数外部分定义变量int test=5;为了在yy.cpp里使用刚刚定义的tes... 阅读全文
posted @ 2005-05-08 23:04 流云 阅读(762) 评论(0) 推荐(0) 编辑

摘要: ①对于一般常量,const在类型说明符的前面或者后面,都是一样的.eg: const int i=9; int const i=9; ②使用const修饰指针时,会由于const位置不同而含义不同. eg: char * const p=str1;p为常量指针,p的指向不可以变,而*p可更新,即语句p=str2 非法,语句*p="C"正确. const char * p=str1;p... 阅读全文
posted @ 2005-05-08 23:00 流云 阅读(484) 评论(0) 推荐(0) 编辑

摘要: C允两者不一致,而C++则不允许. //...... void *f; int i=1,*p; f=&i; p=(int*)f; f=p; cout<<"p is "<<p<<*p; cout<<"f is "<<f<<*f; // void... 阅读全文
posted @ 2005-05-08 22:57 流云 阅读(394) 评论(0) 推荐(0) 编辑

摘要: 1.new 用法:指向对应类型的指针=new 类型描述符 a. 一个机器字长 int *p; p=new int; b. 一个机器字长,并赋值 int *p; p=new int(20); c. 多个字长,按数组或指针引用 int *p; p=new int [20]; 2.delete 用法:delete 指针名 指针是数组... 阅读全文
posted @ 2005-05-08 22:56 流云 阅读(320) 评论(0) 推荐(0) 编辑

摘要: 成员初始化 阅读全文
posted @ 2005-05-08 22:54 流云 阅读(302) 评论(0) 推荐(0) 编辑

摘要: 类的构造函数 阅读全文
posted @ 2005-05-08 22:54 流云 阅读(381) 评论(0) 推荐(0) 编辑

摘要: 对话框绘图 阅读全文
posted @ 2005-05-08 22:49 流云 阅读(3799) 评论(4) 推荐(0) 编辑

摘要: 在此篇之前我们已经学会了在窗口显示图形,更准确的说是在窗口指定位置显示图形或文字,我们使用的坐标单位是象素,称之为设备坐标。看下面语句: pDC->Rectangle(CRect(0,0,200,200)); 画一个高和宽均为200个象素的方块,因为采用的是默认的MM_TEXT映射模式,所以在设备环境不一样时,画的方块大小也不一样,在1024*768的显示器上看到的方块会比640*480... 阅读全文
posted @ 2005-05-08 17:26 流云 阅读(772) 评论(0) 推荐(0) 编辑

摘要: 1#include 2#include 3inttemp,m[30][30]={0,}; 4voidHelix(intmin,intmax) 5{ 6for(inti=min;i>N; 22if(N30) 23break; 24max=N-1; 25temp=1... 阅读全文
posted @ 2005-05-08 17:00 流云 阅读(678) 评论(0) 推荐(0) 编辑

摘要: 给C++初学者的50个忠告 1.把C++当成一门新的语言学习(和C没啥关系!真的。); 2.看《Thinking In C++》,不要看《C++变成死相》; 3.看《The C++ Programming Language》和《Inside The C++ Object Model》,不要因为他们很难而我们自己是初学者所以就不看; 4.不要被VC、BCB、BC、MC、TC等词... 阅读全文
posted @ 2005-05-08 15:32 流云 阅读(264) 评论(0) 推荐(0) 编辑

摘要: 批处理教程 小引: 最近好多猜测弱口令的病毒在网上流行,比如前段时间闹得很厉害的Worm.Dvldr 蠕虫就是一个典型。这些病毒有个共同点就是利用批处理来进行ipc$连接,从而来猜测管理员的口令达到控制服务器的目的。病毒由几个文件和几个复杂的批处理组成。批处理算不上真正意义上的编程,但是它的一些思想和编程比较近似。通过在... 阅读全文
posted @ 2005-05-08 15:29 流云 阅读(438) 评论(0) 推荐(0) 编辑

摘要: 函数名: printf 功 能: 产生格式化输出的函数 用 法: int printf(char *format...); 程序例: #include #include #define I 555 #define R 5.5 int main(void) { int i,j,k,l; char buf[7]; char *prefix = b... 阅读全文
posted @ 2005-05-08 15:24 流云 阅读(3306) 评论(0) 推荐(0) 编辑

摘要: 出处:http://www.cnblogs.com/wiseman/archive/2004/11/26/69057.aspx 阅读全文
posted @ 2005-05-08 15:19 流云 阅读(708) 评论(0) 推荐(0) 编辑

摘要: 小工具 实用 资源 阅读全文
posted @ 2005-05-08 14:47 流云 阅读(345) 评论(0) 推荐(0) 编辑

摘要: 内存DC 缓存作图 阅读全文
posted @ 2005-05-08 14:33 流云 阅读(547) 评论(0) 推荐(0) 编辑

摘要: 对话框 截获回车键 阅读全文
posted @ 2005-05-08 14:27 流云 阅读(427) 评论(0) 推荐(0) 编辑

摘要: 编辑框 文字背景色 阅读全文
posted @ 2005-05-08 14:24 流云 阅读(1140) 评论(0) 推荐(0) 编辑

摘要: CProgressCtrl 对话框 阅读全文
posted @ 2005-05-08 14:05 流云 阅读(717) 评论(0) 推荐(0) 编辑

摘要: CFileDialog 阅读全文
posted @ 2005-05-08 14:01 流云 阅读(508) 评论(0) 推荐(0) 编辑

摘要: WinExec() , CreateProcess() , ShellExecute() 阅读全文
posted @ 2005-05-08 13:56 流云 阅读(858) 评论(0) 推荐(0) 编辑