码迷,mamicode.com
首页 >  
搜索关键字:char instead of a st    ( 42572个结果
sscanf的应用
1.提取字符串2.提取指定长度的字符串3.提取指定字符为止的字符串4.取仅包含指定字符集的字符串5.取到指定字符集为止的字符串#include int main(){ char str[512]={0}; sscanf("123456","%s",str); printf("str...
分类:其他好文   时间:2014-05-12 17:15:19    阅读次数:322
用fseek和ftell获取文件的大小
#include #include #include int main(int argc,char *argv[]){ int n=0; FILE *fp; if((fp=fopen(argv[1],"r"))==NULL) { perror("fopen");...
分类:其他好文   时间:2014-05-02 18:05:54    阅读次数:308
ecl函数的用法
相关函数fork, execle, execlp, execv, execve, execvpWindows下头文件#include Linux下头文件#include 函数定义int execl(const char *path, const char *arg, ...);函数说明execl()...
分类:其他好文   时间:2014-05-02 17:52:52    阅读次数:674
拷贝构造函数[c++]
拷贝构造函数何时会被调用?1. 对象以值传递的方式传入函数参数2.对象以值传递的方式从函数返回3.对象需要通过另外一个对象进行初始化下面我们来看代码://#include //using namespace std;//template //T:队列的类型,char,int,double,包括自己....
分类:编程语言   时间:2014-05-02 17:33:17    阅读次数:401
printf/scanf格式
(1)打印字符char c;printf("%c",c);(2)打印整形int i;printf("%d",i); //有符号十进制数printf("%u",i); //无符号十进制数(3)打印浮点数float f;printf("%f",f);(4)打印指针int *p;pri...
分类:其他好文   时间:2014-05-02 16:13:07    阅读次数:378
用fread和fwrite实现文件复制操作
#include #include #include int main(int argc,char **argv){ FILE *fp_src,*fp_des; char buf[128]; int num; if(argc!=3) { printf("t...
分类:其他好文   时间:2014-05-02 16:06:36    阅读次数:562
[Unity3D]引擎崩溃、异常、警告、BUG与提示总结及解决方法
1.U3D经常莫名奇妙崩溃。一般是由于空异常造成的,多多检查自己的引用是否空指针。2.编码切换警告提示。警告提示:Some are Mac OS X (UNIX) and some are Windows.This might lead to incorrect line numbers in st...
分类:其他好文   时间:2014-05-02 14:27:11    阅读次数:752
获取CPU频率
#include #include float get_cpu_clock_speed(){ FILE *fp; char buffer[1024]; size_t bytes_read; char *match; float clock_speed; fp=fo...
分类:其他好文   时间:2014-05-02 14:20:39    阅读次数:392
C语言中字符串如何转换为二进制、八进制、十进制、十六进制
在C语言某个程序当中需要把文本16进制转换成对应的16进制数,比如字符串"0x1a"转换成10进制的26,可以用以下函数来实现相关函数: atof, atoi, atol, strtod, strtoul表头文件: #include 定义函数: long int strtol(const char ...
分类:编程语言   时间:2014-05-02 09:58:29    阅读次数:290
理解指针
如题:理解指针VS如何看汇编代码(DEBUG状态) Debug->Windows->DisAssambly即可看到汇编窗口先看看C++代码int _tmain(int argc, _TCHAR* argv[]){ /* char temp[100] = "c:\abc\bcd\cde ...
分类:其他好文   时间:2014-05-02 06:02:18    阅读次数:276
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!