码迷,mamicode.com
首页 >  
搜索关键字:printf bc    ( 16964个结果
Wget下载多个链接
需要wget下载多个文件链接时,可以采用如下方法:1. 将链接存入文件url.list中;2. wget -bc -i url.list -o [log_file] -P [target_dir]其中,-b backgournd,即后台下载;-c continues,继续下载尚未完成的任务,即如.....
分类:其他好文   时间:2014-07-06 23:31:25    阅读次数:221
转载:用vector保存对象时保存指针的优点, 以及reserve的使用
#include #include class A{public: A() { printf("A()/n"); } ~A() { printf("~A()/n"); } A(const A& other) { ...
分类:其他好文   时间:2014-07-06 20:44:00    阅读次数:152
C primer plus 练习题 第三章
5. 1 #include 2 3 int main() 4 { 5 float you_sec; 6 printf("请输入你的年龄:"); 7 scanf("%f", &you_sec); 8 printf("年龄合计:%e 秒!\n", you_sec * ...
分类:其他好文   时间:2014-07-06 16:24:54    阅读次数:162
linux内核中驱动开发常见的相似多态
#include#includestruct test{ char name[20]; void (*func)(char *);};void tttfunc(char *name){ printf("current is %d\n",__LINE__); printf("%s\n",name);}...
分类:系统相关   时间:2014-07-06 15:44:49    阅读次数:223
c语言中读入带空格的字符串
问题:  scanf("%s", a); 运行输入hello world   回车 则输入到a的只是空格之前的部分,怎样把空格之后的部分也输出? 1. scanf( "%[^\n]", str ); #include int main(){ char str[50]; scanf( "%[^\n]", str ); printf( "%s\...
分类:编程语言   时间:2014-07-06 11:05:52    阅读次数:211
对两个奇葩的C语言程序的思考
两个奇葩的C语言程序 #include #include void main(int i) { printf("%d\n", i); (&main + (&exit - &main)*(i/1000))(i+1); }...
分类:编程语言   时间:2014-07-06 08:49:11    阅读次数:359
Obj-C数组以及字符串拼接与分割
Obj-C只是增加了一点“特殊语料”的C语言,所以可以用printf()代替NSLog()。但我们建议使用NSLog,因为它添加了特性,例如时间戳,日期戳和自动附加换行符(‘\n’)等。1.OC的数组成员是任意的对象指针 与C中的链表结构类似(以nil结尾) 一切的数组操作不能越界OC的数组分为.....
分类:其他好文   时间:2014-07-05 22:33:03    阅读次数:341
顺序结构设计(c语言)
1.用温度计测出用华氏表示的温度#include int main(){float f,c;f=64.0;c=(5.0/9)*(f-32);printf("f=%f\nc=%f\n",f,c);return 0;}2.计算存款利息,有一百元,想存一年。有3种方法:活期,年利率为r1;一年定期,年利率...
分类:编程语言   时间:2014-07-05 18:33:54    阅读次数:191
二维数组指针
关于一维数组的指针例子:int a[3]={1,2,3};int *p=a;printf("%d",*p);输出为1一维数组指针就是该一维数组第一元素的地址,取值运算*结果是第一个元素存储值。再看二元数组例子:int v[2][5]={{1,2,3,4,5},{6,7,8,9,10}};int (*...
分类:其他好文   时间:2014-07-05 18:13:03    阅读次数:179
可变参数函数
一、什么是可变参数  我们在C语言编程中有时会遇到一些参数个数可变的函数,例如printf()函数,其函数原型为:  int printf( const char* format, ...);  它除了有一个参数format固定以外,后面跟的参数的个数和类型是可变的(用三个点“…”做参数占位符),实际调用时可以有以下的形式:  printf("%d",i);  printf("%s",s...
分类:其他好文   时间:2014-07-05 10:38:06    阅读次数:199
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!