博客内容经历了一次整理,以前发的博文太散、没什么水准,搞的随笔分类越来越多orz,这次把CPP这本书的课后练习的程序代码放到一起方便查阅与修改。。嗯9.6.1#ifndef _9.6.1_H_#define _9.6.1_H_#include #include const int Len = 40;struct golf{ char fullname[Len]; int handicap;};//non-interactive version//function sets golf structure to provided name, handicap//using values... Read More
// binary.cpp -- binary file I/O#include #include #include #include //for exit()using namespace std;const char * file = "planets.dat";struct planet{ char name[20]; //name of planet double population; //its population double g; //its acceleration of gravity};inline void eat... Read More