- 博客(3)
- 收藏
- 关注
原创 cin.get(),cout.put(),cin.eof()的应用案例
// 处理一个流中的各个字符 // Counts the number of characters in a line and lines in a stream // 对一行中的字符数和流中的行数进行计数 // cin.get(),cout.put(),cin.eof() 这三个函数是非常有用的。 // cin.eof() 在cin.get()得到文件结束字符时才返回true. 有下面
2012-02-14 16:20:52 1005
原创 自定义对枚举类型的读写函数
// 自定义对枚举类型的读写函数 // 时间:2012年2月14日,情人节哎。。 // 环境:VC6.0 #include #include using namespace std; // 全局,枚举类型定义 enum color{red, green, yellow, blue}; // 读写的函数原型 color readColor(); void writ
2012-02-14 14:03:10 752
原创 魔方
// 功能:3X3的矩阵,有1到3*3=9这九个数组成, // 如果行列与对角线的和都相等,那么就是魔方阵。 // 输出所有的3X3的魔方 // 时间 :2012年2月12日 // 开发测试环境:VC6.0 #include using namespace std; #define argue a1,a2,a3,a4,a5,a6,a7,a8,a9 // 实参表
2012-02-12 17:12:08 393 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人