码迷,mamicode.com
首页 >  
搜索关键字:freopen    ( 1399个结果
UVA12897 - Decoding Baby Boos
签到题。思想类似线段树懒操作。#include#includeconst int maxlen = 1000000+10;char str[maxlen];char to[256];int main(){ //freopen("in.txt","r",stdin); //freopen(...
分类:其他好文   时间:2015-07-16 21:55:22    阅读次数:268
eclipse CDT写c++使用文件作为输入源(输入重定向)
在main函数第一句增加以下。 freopen("inputfile","r",stdin); 创建一个inputfile,放工程根目录下。 注意增加: #include 做ACM题目的时候有用。...
分类:编程语言   时间:2015-07-16 16:53:41    阅读次数:217
usaco生成器
同路径下生成要求的名字.cpp 和.in,可以把数据存进去。改下XXX YYY就能用了patpat只是因为太懒,望天#include using namespace std;string op;int main(){ cin >> op; freopen((op+".cpp").c_st...
分类:其他好文   时间:2015-07-14 22:32:49    阅读次数:165
编译器实践 二 之 小型的词法分析器
下面是一个简单的词法分析器 #include #include using namespace std ; int main() { char str[150] ; // freopen("C:\\Users\\Lionel\\Desktop\\1.txt","r",stdin) ; int row = 1 , cow = 0 ; while(gets(str)) { char temp[10] ; int index = 0 , i = 0; ...
分类:其他好文   时间:2015-07-13 22:32:51    阅读次数:232
setbuf和freopen
看memcached代码的时候学习了一个api,setbuf,可以设置文件流的缓冲区。 #include void setbuf(FILE *stream, char *buf); void setbuffer(FILE *stream, char *buf, size_t size); void....
分类:其他好文   时间:2015-07-07 12:52:15    阅读次数:180
hdu2024C语言合法标识符
1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 int main()10 {11 //freopen("in.txt","r",stdin);12 ...
分类:编程语言   时间:2015-07-05 09:29:22    阅读次数:142
【区间dp】codevs1966 乘法游戏
f(i,j)=min{f(i,k)+f(k,j)+a[i]*a[k]*a[j]}(1#include#includeusing namespace std;int n,a[101],f[101][101];int main(){// freopen("codevs1966.in","r",stdin...
分类:其他好文   时间:2015-06-24 09:20:01    阅读次数:111
重定向输入输出流--freopen
freopen是被包含于C标准库头文件中的一个函数,用于重定向输入输出流。该函数可以在不改变代码原貌的情况下改变输入输出环境。C99函数声明:FILE *freopen(const char * restrict filename, const char * restrict mode, FILE ...
分类:其他好文   时间:2015-06-23 17:14:29    阅读次数:105
C语言读写文件
FOPEN(3) Linux Programmer’s Manual FOPEN(3)NAME fopen, fdopen, freopen - stream open functionsSYNOPSIS #include FILE *fopen(const c...
分类:编程语言   时间:2015-06-11 20:51:12    阅读次数:121
POJ 2521
1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 //freopen("acm.acm","r",stdin); 8 int a; 9 int b;10 int c;11 ...
分类:其他好文   时间:2015-06-11 12:56:31    阅读次数:130
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!