08 2009 档案

gcc编译将编译信息输出到文件的方法
摘要:make >[file name] 2>&1 阅读全文

posted @ 2009-08-31 17:33 vincenzo.lai 阅读(1172) 评论(0) 推荐(1)

Eclipse开发c++(二)
摘要:这里对(一)中的一些东西做补充的说明1. MinGW自带一个make程序,但是ms大家对这个make的评价很差,于是eclipse推荐不要用这个make,而改用MSYS提供的make程序。2. 在(一)中,并没有提到安装MSYS,也没有安装make,但是为什么可以make,运行程序呢?是因为新版的C++ Eclipse 的CDT自带了一个make,可以make程序。3. CDT是一个强大的环境,可... 阅读全文

posted @ 2009-08-28 23:06 vincenzo.lai 阅读(1900) 评论(0) 推荐(0)

Eclipse开发c++(一)
摘要:本文主要说明,如何用Eclipse进行c++开发。准备工作:1. 下载安装jre。eclipse运行需要java支持,到http://www.java.com/zh_CN/download/manual.jsp#win上面去下载windows下的jre环境安装文件,建议下载脱机版的,因为这样,你可以到处copy安装。下载完之后,安装。2. 下载安装eclipse,到http://www.eclip... 阅读全文

posted @ 2009-08-27 23:23 vincenzo.lai 阅读(7289) 评论(0) 推荐(1)

C的struct内存对齐的问题(二)
摘要:#include <stdio.h>#include <iostream.h>int main(void){ typedef struct{ unsigned short a:8; unsigned short b:9; unsigned short c:10; }T_struct1; typedef struct{ unsigned short a:2; unsign... 阅读全文

posted @ 2009-08-25 10:53 vincenzo.lai 阅读(386) 评论(0) 推荐(0)

C的struct内存对齐的问题
摘要:采用VC6的的编译器对于struct:struct ST_DAT1 { char cDatA; int nDatC; char cDatB; } stDblChr;struct ST_DAT2 { char cDatA; char cDatB; int nDatC; } stDblChr;很显然,编译器在编译的时候,要做内存对齐的调整。由于两个struct中最长的变量都是int,占... 阅读全文

posted @ 2009-08-25 10:44 vincenzo.lai 阅读(1336) 评论(0) 推荐(0)

C在return之后执行函数
摘要:通过atexit调用函数,可以再main函数return之后再执行刚刚被调用的函数。msdn解释是:The atexit function is passed the address of a function (func) to be called when the program terminates normally. Successive calls to atexit create a ... 阅读全文

posted @ 2009-08-25 10:09 vincenzo.lai 阅读(946) 评论(0) 推荐(0)

导航