码迷,mamicode.com
首页 >  
搜索关键字:fopen fclose fread fwrite fseek    ( 1787个结果
c语言实现把pid值写入文件中
#include "stdio.h" #include "assert.h" int main() { char buff[32]; int nPid = getpid(); snprintf(buff, 32, "%d", nPid); //参数1:要被写入的字符串 参数2:写入的大小,防止写入大 ...
分类:编程语言   时间:2020-04-24 01:25:14    阅读次数:95
c++之io操作
c++ fstream中seekg()和seekp()的用法 先说一下C语言中fseek()的功能: 函数原型:int fseek(FILE *fp, LONG offset, int origin) 参数含义:fp 文件指针 offset 相对于origin规定的偏移位置量 origin 指针移动 ...
分类:编程语言   时间:2020-04-21 15:09:56    阅读次数:75
# sqllab-Less6-10
sqllab Less6 10 less6 1. 先不看源码(依靠前面几关的经验盲猜) ? ,没出现语法报错,说明 不起作用,可能不是这个闭合方式 出现语法错误,说明 起作用,闭合方式应该是这个 ,正常闭合,确定 是闭合方式 , 可以正常执行,并且看到的结果都是这个,说明这关可能和前面一关一样是正确 ...
分类:数据库   时间:2020-04-19 19:40:26    阅读次数:101
【题解】数 [Bzoj5282]
【题解】数 [Bzoj5282] 传送门: "数 $\text{[Bzoj5282]}$" 【题目描述】 众所周知,萌萌哒六花不擅长数学,所以勇太给了她一些数学问题做练习,其中有一道是这样的: 一个正整数被称为是好的当且仅当它的十进制表示是其二进制表示的后缀。 例如正整数 $(100)_{10}$ ...
分类:其他好文   时间:2020-04-14 18:42:28    阅读次数:94
window使用文件路径方式
fp = fopen("D:\\pthread\\Pre-built.2\\111.yuv", "rb+"); // 绝对路径 符号 \\ ...
分类:Windows程序   时间:2020-04-12 22:26:49    阅读次数:91
CF793G Oleg and chess [线段树优化建边,扫描线,最大流]
不相交就直接搞啊。。没啥技巧,i j如果选了就是(i,j)选了。 ...
分类:其他好文   时间:2020-04-11 09:50:05    阅读次数:93
输出矩阵四周的数字的平均数(C)
// practice #include<stdio.h> //#include<conio.h> #include<stdlib.h> double func1(int (*number)[4]) { int k=0; double result =0; for(int i=0;i<3;i++) ...
分类:其他好文   时间:2020-04-06 11:49:28    阅读次数:61
cocos2d-X 打开一个文件是否跨平台
//如果直接fopen是不跨平台的 //需要使用cocos每个平台封装好的方法 { FileUtils *utils = FileUtils::getInstance(); std::string outFileName = utils->fullPathForFilename(zipFile); ...
分类:其他好文   时间:2020-04-04 00:25:41    阅读次数:304
stdio判断文件是否存在方法?
FILE *pfile = NULL; pfile = fopen(filename, "r"); if (pfile == NULL) { return false; } fclose(pfile); 1.标准stdio输入输出,跨平台 》能使用stdio的不要使用writefile 由此可见一斑 ...
分类:其他好文   时间:2020-04-03 09:16:05    阅读次数:86
输出分割的字符串
1 #pragma warning(disable:4996) 2 #include<stdio.h> 3 #include<string.h> 4 #include<stdlib.h> 5 int main() { 6 7 FILE*p = fopen("Text.txt", "r+"); 8 i ...
分类:其他好文   时间:2020-03-30 19:59:48    阅读次数:70
1787条   上一页 1 ... 6 7 8 9 10 ... 179 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!