zhiye_wang

向星空仰望的越深,越发现自己的渺小

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

随笔分类 -  C/C++通用

摘要:一 在C源文件中调用C++封装的接口 例如: 要想在A.c文件中,调用生命在B.h,实现在B.cpp中的接口bool getMAC(char *mac_addr); 其实现方法 B.cpp 如下: 1 // B.cpp 2 3 #ifndef _cplusplus 4 #define _cplusp 阅读全文
posted @ 2016-03-02 10:42 zhiye_wang 阅读(582) 评论(0) 推荐(0)

摘要:1 #include "stdafx.h" 2 #include "iostream" 3 #include "assert.h" 4 5 using namespace std; 6 7 int mystrcmp(const char* dest, const char* src) 8 { 9 a 阅读全文
posted @ 2016-02-23 10:26 zhiye_wang 阅读(118) 评论(0) 推荐(0)

摘要:1 #include "stdafx.h" 2 #include "iostream" 3 #include "assert.h" 4 #include "string" 5 6 using namespace std; 7 8 char* mystrcat(char* dest, const ch 阅读全文
posted @ 2016-02-23 10:26 zhiye_wang 阅读(151) 评论(0) 推荐(0)

摘要:1 #include "stdafx.h" 2 #include "iostream" 3 #include "assert.h" 4 5 using namespace std; 6 7 char* mystrncpy(char* dest, const char* src, int n) 8 { 阅读全文
posted @ 2016-02-23 10:25 zhiye_wang 阅读(203) 评论(0) 推荐(0)

摘要:1 #include "stdafx.h" 2 #include "iostream" 3 4 using namespace std; 5 6 int isechol (const char* str) 7 { 8 int length = strlen(str); 9 for (int i=0; 阅读全文
posted @ 2016-02-23 10:25 zhiye_wang 阅读(179) 评论(0) 推荐(0)

摘要:1 #include "stdafx.h" 2 #include "iostream" 3 #include "assert.h" 4 5 using namespace std; 6 7 char* mystrcpy(char* dest, const char* src); // 1 const 阅读全文
posted @ 2016-02-23 10:24 zhiye_wang 阅读(156) 评论(0) 推荐(0)