码迷,mamicode.com
首页 >  
搜索关键字:visaul stdio    ( 10042个结果
MAC地址在18字节及6字节之间的转换
#include?<stdio.h> #include?<string.h> #define?unsigned?int?u32 #define?MACSTR?"%02x:%02x:%02x:%02x:%02x:%02x" #define?MACSTOL(a)??(a)[0],?(a)[1],?(a)[2],?(a)[3],?(a)[4],?(a)[5] #d...
分类:系统相关   时间:2014-10-16 05:45:22    阅读次数:281
外部变量初始化与常量表达式
代码: #include?<stdio.h> #include?<stdlib.h> //?外部存储类(external?storage?class):具备文件作用域、外部链接和静态存储时期的类型 //?外部变量(external?variable):具备外部存储类的变量 in...
分类:其他好文   时间:2014-10-15 16:40:11    阅读次数:149
每天进步一点点--&gt;函数fseek() 使用方法
在阅读代码时,遇到了非常早之前用过的fseek(),非常久没实用了,有点陌生,写出来以便下次查阅。函数功能是把文件指针指向文件的开头,须要包括头文件stdio.hfseek函数名: fseek功 能: 重定位流上的文件指针用 法: int fseek(FILE *stream, long offse...
分类:其他好文   时间:2014-10-15 11:28:50    阅读次数:242
静态存储期
代码: #include?<stdio.h> #include?<stdlib.h> void?func(void); int?main(void)?{ for?(int?i?=?0;?i?<?9;?++i)?{ func(); } return?EXIT_SUCCESS; } void?func(void)?{ //?变量...
分类:其他好文   时间:2014-10-15 01:41:09    阅读次数:388
Linux dirname、basename(转)
首先使用 --help 参数查看一下。basename命令参数很少,很容易掌握。$ basename --help用法示例:$ basename /usr/bin/sort 输出"sort"。$ basename ./include/stdio.h .h 输出"stdio"。为basename指定一...
分类:系统相关   时间:2014-10-14 20:02:19    阅读次数:259
BZOJ 1088 水模拟
BZOJ水一道~ 枚举前两个位置是否放雷,模拟向下推,可以则ans++ #include "stdio.h" #include "string.h" int a[10010],b[10010],n; int judge() { int i; for (i=3;i<=n;i++) { b[i]=a[i-1]-b[i-1]-b[i-2]; ...
分类:其他好文   时间:2014-10-14 19:01:09    阅读次数:140
作用域
代码: #include?<stdio.h> #include?<stdlib.h> //?文件作用域:一个在所有函数之外定义的变量具有文件作用域。从它定义处到包含该定义的文件结尾处 int?f;?//?f:文件作用域开始 void?func(int); int...
分类:其他好文   时间:2014-10-14 18:14:10    阅读次数:163
Debug coding
#include?<stdio.h> ? #define?__DEBUG__?? #ifdef?__DEBUG__?? #define?DEBUG(format,...)?printf("File:?"__FILE__",?Line:?%05d:?"format"\n",?__LINE__,?##__VA_ARGS__)?? #else?? #def...
分类:其他好文   时间:2014-10-14 12:45:48    阅读次数:182
随机数的实现原理
http://en.wikipedia.org/wiki/Random_number_generation The GLIBC random number generator讲了GLIBC中random()函数的实现原理,并给出了一段代码: #include <stdio.h> #define MAX 1000 #define seed 1 mai...
分类:其他好文   时间:2014-10-12 17:28:29    阅读次数:198
setjmp与longjmp
这里有编写了很好的文章:http://blog.csdn.net/cscmaker/article/details/7584433,我自己试了一个小例子。 #include?<setjmp.h> #include?<stdio.h> void?my_print(const?char?*str,?jmp_buf?jb) { ??...
分类:其他好文   时间:2014-10-12 13:51:28    阅读次数:152
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!