![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C语言
文章平均质量分 68
xiaohuaidan717
这个作者很懒,什么都没留下…
展开
-
C语言学习笔记
ASCII 表(字符与编码对照表)关键词: ASCII 计算机用数字码来存储字符。ASCII码(美国标准信息交换码)是美国最常用的编码。C用包含在单引号中的字符可以表示绝大多数单字符,例如‘A’表示字符A。也可以用反斜杠与八进制或十六进制组合来表示单字符,例如‘/012’和‘/0xa’都表示字符新建行(LF)。像“Hello, /012my dear”这样的转义序列也可以作为字符串原创 2006-11-13 11:36:00 · 827 阅读 · 0 评论 -
C语言中取得当前工作目录(WIN)
#include char * getCurDir() { DWORD cchCurDir; LPTSTR lpszCurDir; char tchBuffer[PATH_MAX + 1]; lpszCurDir = tchBuffer; GetCurrentDirectory(cchCurDir, lpszCurDir); if (cchCurDir == 0)原创 2010-04-13 15:24:00 · 552 阅读 · 0 评论 -
C语言中查找数组中的元素(WIN)
通常把qsort与bsearch结合起来使用。 qsortqsort的函数声明如下:void qsort(void *base, size_t num, size_t width, int(*comp)(const void *, const void *));参数说明如下:base: 要排序的数组num: 数组中的元素数目width: 每个数组元素占用内存空间,可使用sizeof获原创 2010-03-31 14:33:00 · 4189 阅读 · 0 评论 -
C语言中为文件设置安全属性(WIN)
1.把srcFileName对应的文件的安全属性设置到lpszFileName对应的文件中去。#include #define myheapalloc(x) (HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, x))#define myheapfree(x) (HeapFree(GetProcessHeap(), 0, x))BOOL m原创 2010-03-26 13:22:00 · 1770 阅读 · 0 评论 -
C语言中拷贝文件(WIN)
方法1.BOOL CopyFile( LPCSTR lpExistingFileName, {源文件} LPCSTR lpNewFileName, {目标文件} BOOL bFailIfExists {如果目标文件存在, True: 失败; False: 覆盖}); 这个方法拷贝的文件,其属性如原创 2010-03-26 11:08:00 · 801 阅读 · 0 评论 -
C语言中替换字符串中的子字符串(WIN)
/****************************************//* 替换字符串中的子字符串 *//* char *source : 源字符串 *//* char *sub : 子字符串原创 2010-03-26 10:42:00 · 886 阅读 · 0 评论 -
运用IShellLink和IPersistFile创建快捷方式,设置或读取快捷方式信息
先介绍一下这两个类:IShellLinkThe IShellLink interface allows Shell links to be created, modified, and resolved. MethodsIShellLink supports the following methods:GetArgumentsRetrieves the转载 2010-03-23 11:43:00 · 2924 阅读 · 0 评论 -
Linux下st_blksize与Windows下簇大小的对应
声明:此调查结果如有错误,敬请指正。谢谢^_^ Linux下文件对应的属性struct stat { mode_t st_mode; //文件对应的模式,文件、目录等 ino_t st_ino; //inode节点号 dev_t st_dev; /原创 2010-02-23 16:38:00 · 3241 阅读 · 0 评论 -
KeyCode常量
KeyCode常量,供参考: 键码 常数 值 描述 vbKeyLButton 1 鼠标左键 vbKeyRButton 2 鼠标右键 vbKeyCancel 3 CANCEL 键 vbKeyMButton 4 鼠标中键 vbKeyBack 8 BA转载 2010-02-22 09:31:00 · 496 阅读 · 0 评论 -
CTRL-Z和CTRL-C区别
提问:CTRL-Z和CTRL-C区别?回答:CTRL-Z和CTRL-C都是中断命令,但是他们的作用却不一样.CTRL-C是强制中断程序的执行,而CTRL-Z的是将任务中断,但是此任务并没有结束,他仍然在进程中他只是维持挂起的状态,用户可以使用fg/bg操作继续前台或后台的任务,fg命令重新启动前台被中断的任务,bg命令把被中断的任务放在后台执行.例如:当你vi一个文件是,如果需要用shell执行别转载 2010-02-21 17:03:00 · 728 阅读 · 0 评论 -
strdup
原型:extern char *strdup(char *s); 用法:#include 功能:复制字符串s 说明:返回指向被复制的字符串的指针,所需空间由malloc()分配且可以由free()释放。 举例: // strdup.c #include #include main() {转载 2006-12-14 15:51:00 · 926 阅读 · 0 评论 -
system() Function
system() Function The system() function (declared in ) launches another program from the current program. As opposed to what most users think, it doesnt return the exit code of the launched process转载 2006-12-14 10:17:00 · 687 阅读 · 0 评论 -
用VC++建立Service服务应用程序
用VC++建立Service服务应用程序2006-11-23 13:53 来源:VC知识库 作者:李佳颖(niying) 本文主要介绍了 OpenSCManager、CreateService、OpenService、ControlService、Dele转载 2006-12-08 10:41:00 · 1419 阅读 · 0 评论 -
SERVICE_TABLE_ENTRY
SERVICE_TABLE_ENTRY The SERVICE_TABLE_ENTRY structure is used by the StartServiceCtrlDispatcher function to specify the ServiceMain function for a service that can run in the calling process.转载 2006-12-08 10:22:00 · 4885 阅读 · 0 评论 -
gdb常用命令
break (b)break是用于设置断点的。其快捷键为b。用法示例: break main b main 以上两个都实现了在main()中设置断点。 b test1.c:21 b 21 以上两个都实现了在程序原创 2006-11-21 10:33:00 · 1234 阅读 · 0 评论 -
关于获取文件管理员操作权限的函数
BOOL TakeOwnership(LPTSTR lpszOwnFile) <br />{<br /><br /> BOOL bRetval = FALSE;<br /><br /> HANDLE hToken = NULL; <br /> PSID pSIDAdmin = NULL;<br /> PSID pSIDEveryone = NULL;<br /> PACL pACL = NULL;<br /> SID_IDENTIFI转载 2010-11-12 13:50:00 · 665 阅读 · 0 评论