码迷,mamicode.com
首页 >  
搜索关键字:fp    ( 907个结果
程序读文件的方式--按字符、按行、按单词
程序读文件的方式--一个字符一个字符进行读取 #include #include using namespace std; int main() { char ch; fstream fp("a.txt"); while(!fp.eof()) { if(fp.get(ch)) cout #inclu...
分类:其他好文   时间:2015-05-10 15:37:38    阅读次数:105
记录每次运行的时刻的小程序
#include #include #include #include #include int main(){ char fUrl[] = "c:/document/1.txt"; FILE * fp; char * tmp; long len; int a_len; time_t tt; cha...
分类:其他好文   时间:2015-05-08 23:25:27    阅读次数:190
使用feof()判断文件结束时会多输出内容的原因
这是原来的代码:#include int main(){ FILE * fp; int ch; fp = fopen("d:\\aaaaa\\1.txt","r"); while (!feof(fp)) { ch = getc(fp); putchar(ch); } fclose(fp); re.....
分类:其他好文   时间:2015-05-08 12:31:17    阅读次数:166
实验二 调度
#include #include void main(){ int i=0,j=0,finish=0,n=0,k=0,l,m; int start,temp,max=1,min,respond[24]; int reach[24],running[24]; FILE *fp; ...
分类:其他好文   时间:2015-05-08 09:19:03    阅读次数:136
自定义字符串格式化函数
1 void plog(const char *fmt, ...) 2 { 3 va_list arg; 4 char pbString[256]; 5 va_start(arg, fmt); 6 vsprintf(pbString, fmt, arg); //若此行和下行改为:done = fp....
分类:其他好文   时间:2015-05-05 23:13:45    阅读次数:165
解决三星ARM11开发板图片采集程序源码出现的Bug
三星公司提供的图片采集程序源码是这个:/***************** Capture Thread *****************/ void capture_thread(void) { int start, ret; int key; start = 1; ret = ioctl(cam_c_fp, VIDIOC_STREAMON, &start);...
分类:其他好文   时间:2015-05-05 14:31:44    阅读次数:166
利用三星S3C6410源码实现同时压缩视频和图片
前段时间实现了利用三星S3C6410一边压缩视频生成H264文件一边抓取并压缩生成jpg图片。核心步骤如下: 视频压缩和图片压缩利用同一个handle。 /* Codec set */ /* Get capability */ ret = ioctl(cam_c_fp , VIDIOC_QUERYCAP, &cap);一边压缩视频:if(frame_count == 1)...
分类:其他好文   时间:2015-05-05 14:29:26    阅读次数:199
python中判断readline读到文件末尾
fp = open('somefile.txt')while True: line = fp.readline() if not line: breakPython中,空串的not返回true,即not line时为读到EOF(文件末尾)
分类:编程语言   时间:2015-05-02 16:33:10    阅读次数:2603
php socket 学习
socket超时设置ini_set("default_socket_timeout", -1);stream_set_timeout$fp = fsockopen("www.example.com", 80);if (!$fp) { echo "Unable to open\n";} else...
分类:Web程序   时间:2015-05-01 00:29:34    阅读次数:225
文件系统:读取,文件不存在则创建
1 #include 2 #include 3 #define WAY "save.txt" 4 int main(int argc,int argv[]) 5 { 6 FILE *fp_read,*fp_write; 7 8 fp_read=fopen(WAY,"r+"...
分类:其他好文   时间:2015-04-30 23:05:25    阅读次数:154
907条   上一页 1 ... 66 67 68 69 70 ... 91 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!