2014年1月14日

摘要: void myCopyDirectory(CString source, CString target) { CreateDirectory(target,NULL); //创建目标文件夹 //AfxMessageBox("创建文件夹"+target); CFileFind finder; CString path; path.Format(_T("%s/*.*"),source); //AfxMessageBox(path); BOOL bWorking =finder.FindFile(path); whil... 阅读全文

posted @ 2014-01-14 23:53 sunflover 阅读(2414) 评论(0) 推荐(0)

摘要: 1。在一类的.cpp中定义intmyInt;然后再在要用到的地方的.cpp里externintmyInt;这样就可以用了。2。在stdafx.cpp中加入:intmyInt;然后在stdafx.h中加入:externintmyInt;这样定义以后无论在什么文件中都是可见的.3。比较规范的是,先定义一个Glbs.h,把所有的全局变量原始定义放进去。然后定义一个Externs.h,把你先前定义在Glbs.h中的变量都加上extern。注意:如果你在Glbs.h中设置了初值,那么在Externs.h中就不要加值了。然后调用时,第一次调用的#include,以后调用的#include但不建议上面的做法 阅读全文

posted @ 2014-01-14 16:50 sunflover 阅读(3499) 评论(0) 推荐(1)