摘要: file1.c其中变量及函数声明时需要extern 但是在定义时不能添加,如下所示,file1.c:其中若file1.c中取消注释,则编译通过,因为对于static它是仅局限于静态链接的,只在本文件内使用,而外部文件不能使用。 阅读全文
posted @ 2012-10-17 23:11 SA高处不胜寒 阅读(184) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;char* strcatcp(char *des, char *source1, char *source2){ char *p = des; while ((*des++=*source1++)!='\0'); des--; while ((*des++=*source2++)!='\0'); return p;} int main(void){ char *des, *source1, *source2; des = (char *)malloc(sizeof(sour 阅读全文
posted @ 2012-10-17 09:58 SA高处不胜寒 阅读(632) 评论(0) 推荐(0) 编辑