- 浏览: 225971 次
- 性别:
- 来自: 广州
-
最新评论
-
higkoo:
Keepalived在Reload的时候都会提示:Jan 24 ...
open 创建文件并读写的错误--bad file descriptor -
panyanyany:
iminto 写道你忽悠人呢。。。 serial, 明明是po ...
通过 Zend_Db 向 mysql 写入 null 值的问题 -
iminto:
你忽悠人呢。。。 serial, 明明是postgre SQL ...
通过 Zend_Db 向 mysql 写入 null 值的问题 -
基德KID.1412:
y神写得如此的美啊,太特么好勒!特此顶上! ----KIDx
杭电 hdu 1394 Minimum Inversion Number 【线段树 + 详细注释 + 有难度】 -
基德KID.1412:
顶y哥!
【最短路+bfs+剪枝】杭电 hdu 2433 Travel
文章列表
fread的函数原型是(来自MSDN):
size_t fread( void *buffer, size_t size,
size_t count, FILE *stream
);
我们用fread读的时候,有时会把size设置为整数,比如:300。然后我们可能用一个循环来读取文件的内容:
while ((iBytesRead = fread (buf, 300, 1, fin))
> 0) {
// 具体代码略
}
若有一个文件,它的内容大约为213 bytes,那么,用这个语句来读的话,就会进不到循环里面去了,因为fread返回的是实际所读取的块数 ...
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://acm.hdu.edu.cn/showproblem.php?pid=2018
Name : 2018 母牛的故事
Date : Thursday, February 16, 2012 ...
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://poj.org/problem?id=3189
Name : 3189 Steady Cow Assignment
Date : Monday, February 13, 2012
...
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://poj.org/problem?id=2455
Name : 2455 Secret Milking Machine
Date : Sunday, February 12, 2012
...
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://poj.org/problem?id=2112
Name : 2112 Optimal Milking
Date : Friday, February 10, 2012
Ti ...
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://acm.hdu.edu.cn/showproblem.php?pid=1228
Name : 1228 A + B
Date : Wednesday, February 08, 201 ...
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://acm.hdu.edu.cn/showproblem.php?pid=1875
Name : 1875 畅通工程再续
Date : Tuesday, February 7, 2012
...
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://acm.hdu.edu.cn/showproblem.php?pid=1102
Name : 1102 Constructing Roads
Date : Tuesday, Febru ...
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://acm.hdu.edu.cn/showproblem.php?pid=1879
Name : 1879 继续畅通工程
Date : Monday, February 6, 2012
...
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://acm.hdu.edu.cn/showproblem.php?pid=1863
Name : 1863 畅通工程
Date : Monday, February 6, ...
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://acm.hdu.edu.cn/showproblem.php?pid=1233
Name : 1233 还是畅通工程
Date : Monday, February 06, 2012
...
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://acm.hdu.edu.cn/showproblem.php?pid=1879
Name : 1879 继续畅通工程
Date : Sunday, February 05, 2012
...
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://acm.hdu.edu.cn/showproblem.php?pid=1863
Name : 1863 畅通工程
Date : Sunday, February 5, 2012
...
第一次 Prim 思想初步实践版
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://acm.hdu.edu.cn/showproblem.php?pid=1233
Name : 1233 还是畅 ...
本程序在windows下的应用软件请到这里下载(含MFC源代码):
http://download.csdn.net/detail/panyanyany/4041703
一开始的时候是用C语言做的,分行来处理,C的标准库里好像没有按行读取文本的函数,于是只好自己做了一个,很好很方便~~
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#define isdigit(c) ('0' <= (c) & ...