zhiye_wang

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

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

2016年3月2日 #

摘要: 一 在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 阅读(562) 评论(0) 推荐(0) 编辑

2016年2月26日 #

摘要: 一 近期需要用到PostScript,查询资料学习PS的语法 简单的画一个圆的例子 %!PS-Adobe-3.0 /inch{72 mul} def 4.25 inch 5.5 inch 1.5 inch 0 360 arc 0.1 inch setlinewidth stroke showpage 阅读全文
posted @ 2016-02-26 10:39 zhiye_wang 阅读(297) 评论(0) 推荐(0) 编辑

2016年2月24日 #

摘要: linux中有三种标准输入输出,分别是STDIN,STDOUT,STDERR,对应的数字是0,1,2。 STDIN就是标准输入,默认从键盘读取信息; STDOUT是标准输出,默认将输出结果输出至终端,也就是显示器之类的东西; STDERR是标准的错误信息,默认也会显示在终端上。 由于STDOUT与S 阅读全文
posted @ 2016-02-24 11:11 zhiye_wang 阅读(338) 评论(0) 推荐(0) 编辑

2016年2月23日 #

摘要: 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 阅读(142) 评论(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 阅读(113) 评论(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 阅读(192) 评论(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 阅读(173) 评论(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 阅读(147) 评论(0) 推荐(0) 编辑

摘要: 1 /* 2 * ===================================================================================== 3 * Filename: userGroup.cpp 4 * Description: add user 5 阅读全文
posted @ 2016-02-23 10:23 zhiye_wang 阅读(984) 评论(0) 推荐(0) 编辑

摘要: 调用API函数NetShareAdd()将文件夹设置为共享,调用此函数后如果不做其他设置,网络用户是无法访问共享文件夹的,因为此文件夹在NTFS分区中,同时受到NTFS文件系统的访问控制,因此还需要第2步;调用DOS命令cacls,赋予Guest用户组读写权限;如果要取消文件共享,直接调用API函数 阅读全文
posted @ 2016-02-23 10:19 zhiye_wang 阅读(499) 评论(0) 推荐(0) 编辑