钱穆的中学读书事(作者王国华)

在这里插入图片描述
      重读国学大师钱穆先生的著作《师友杂忆》,记其中学读书事,越读越感慨。20世纪初,钱穆就读于常州府中学堂。其同学中有一人就是后来的刘半农;有个小他两级的师弟,就是后来的瞿秋白;有个老师,竟是文史大家吕思勉。一个不起眼的学校,走出这么多耀眼的 人,一定有其独到之处。而钱穆记录的几则师生轶事,恰可体现彼时的学风,即:讲规则,有错必究;重个性,全面发展,不拘一格。

      先说这有错必究。有一次考画图,题目为“知更鸟,一树枝,三鸟同栖”。钱穆画了一长条,表示树枝;长条上画了三个圆圈,表示三鸟;每个圆圈上部各加两个墨点,表示每一鸟之双目,墨点既圆且大。同学们看见这张考卷,都说鸟的两只大眼睛极像图画科杨老师,正好被杨老师听到。杨老师极为震怒,因此给钱穆打了零下二厘的分数,比零分还低。还有一次,舍监陈士辛老师来查房。按规矩,每夜上自修课两小时,课毕开放寝室,定时熄灯,自此不许作声。当时钱穆正与一个同学在帐内对床互语,陈士辛老师说:“想说话可到舍监室跟我谈。”钱穆遂披衣起床,尾随陈老师下楼。起初陈士辛老师并未发觉,走进舍监室才发现后面有人。问其原因,钱穆答:“按您说的到这里来跟您谈话。”老师大怒,斥其速去睡觉。年终的操行评分,钱穆仅得25分。该时代尊师重教,不管是有意无意,拿老师开玩笑总归要受到惩戒,钱穆对此并无怨言。

      再说不拘一格。现今教育有素质教育和应试教育之区别。都说前者好,但真正运作起来,往往后者更有效,其实还是录取指挥棒的原因。

      钱穆讲,文史大家吕思勉给他们教历史、地理两门课程。吕思勉上地理课,必带一本上海商务印书馆所印的《中国大地图》。先将各页拆开,讲一省,择取一图,在小黑板上画一“十”字形,然后绘出此省之边界线,说明其所处位置,再在界内绘出山脉及河流湖泽,讲明自然地理后,再加注都市城镇关卡及交通道路等。一次考试,出了四道题,每题25分。钱穆尤其喜欢有关吉林省长白山地势军情的第三题,一时兴起,洋洋洒洒写了很多,不料考试时间已过,整张试卷仅答一题。吕思勉在阅卷时,在卷后加了许多批语,写完一张,又写了一张。这些考卷本不发给学生,只批分数,因此不需加批语。而吕思勉手握一支铅笔奋笔疾书,写字太久,铅笔需再削,为省事,他用小刀将铅笔劈成两半,将中间的铅条抽出,不断地写下去。最后不知其批语写了多少,也不知其所批何语,而钱穆仅凭这一道题就得了75分。可见是学生的答卷触动了老师,而老师也因这种触动给学生打了高分。今日西方国家的学校授课,不注重死记硬背,从小学即考问世界观与价值观,动辄要回答有关世界和平的问题,以便形成健康的人生底色和品格。

      还有一例可以佐证。钱穆有一位徐姓数学老师,性格怪异,人称“徐疯子”。有一次月考,这位徐老师出了四道题,其中一题为:1-( )-( )-( )-( )……等于多少。钱穆思考了半天,忽然想到《庄子·天下篇》中有“一尺之棰,日取其半,万世不竭”之语,遂将答案写为“0……1”,徐老师认为这个答案正确。他跟学生们说:“试试你们的聪明而已,答不中也没什么关系。”能把哲学问题转化成数学问题来考学生,并对答案持开放态度,这样的老师如今还有几人?

      钱穆还回忆,当时学校里设有“游艺班”,分为多组,学生们可自由选择。钱穆家七房桥有世袭乐户丁家班,专为族中的喜庆宴会唱昆曲助兴。钱穆自幼耳濡目染,颇有兴趣,于是选修昆曲。笛、笙、箫、唢呐、三弦、二胡、鼓、板等各种乐器,生、旦、净、丑等各种角色,钱穆均有涉猎。他还专习生角,唱《长生殿》剧中的郭子仪,举手投足皆像模像样。吹箫尤其成为钱穆生平一大乐事,他每感孤寂时,便以箫自娱,其声呜咽沉静,如同身处他境,神思悄然游荡在天地之间。

      钱穆少年读书的往事至今已经100多年,想今日之功利,念彼时之性情,岂不让人痛心?

好的,那我开始编写代码。以下是完整的代码注释和功能实现。 ```C++ #include <iostream> #include <fstream> #include <vector> #include <algorithm> using namespace std; // 建立书籍类 class Book { public: Book() {} Book(int id, string name, string author, string type, string press, double price, int total, int rest) { this->id = id; this->name = name; this->author = author; this->type = type; this->press = press; this->price = price; this->total = total; this->rest = rest; } int getId() const { return id; } string getName() const { return name; } string getAuthor() const { return author; } string getType() const { return type; } string getPress() const { return press; } double getPrice() const { return price; } int getTotal() const { return total; } int getRest() const { return rest; } void setName(string name) { this->name = name; } void setAuthor(string author) { this->author = author; } void setType(string type) { this->type = type; } void setPress(string press) { this->press = press; } void setPrice(double price) { this->price = price; } void setTotal(int total) { this->total = total; } void setRest(int rest) { this->rest = rest; } private: int id; // 书籍编号 string name; // 书籍名称 string author; // 作者 string type; // 类型 string press; // 出版社 double price; // 价格 int total; // 总数 int rest; // 剩余数量 }; // 建立图书类型类 class BookType { public: BookType() {} BookType(int id, string type) { this->id = id; this->type = type; } int getId() const { return id; } string getType() const { return type; } void setType(string type) { this->type = type; } private: int id; // 图书类型编号 string type; // 图书类型名称 }; // 建立图书类 class Library { public: Library() {} // 初始化 void init(); // 添加书籍 void addBook(); // 修改书籍 void modifyBook(); // 删除书籍 void deleteBook(); // 查找书籍 void searchBook(); // 输出所有书籍信息 void printBooks(); // 按编号排序 void sortById(); // 按书名排序 void sortByName(); // 保存到文件 void saveToFile(); // 从文件中读取 void readFromFile(); private: vector<Book> books; // 书籍信息 vector<BookType> bookTypes; // 图书类型信息 }; void Library::init() { // 初始化图书类型信息 bookTypes.push_back(BookType(1, "计算机")); bookTypes.push_back(BookType(2, "文学")); bookTypes.push_back(BookType(3, "历史")); bookTypes.push_back(BookType(4, "经济")); bookTypes.push_back(BookType(5, "哲学")); bookTypes.push_back(BookType(6, "心理学")); bookTypes.push_back(BookType(7, "教育")); bookTypes.push_back(BookType(8, "体育")); bookTypes.push_back(BookType(9, "医学")); bookTypes.push_back(BookType(10, "法律")); // 初始化书籍信息 books.push_back(Book(1, "C++程序设计基础", "谭浩强", "计算机", "清华大学出版社", 69.0, 10, 10)); books.push_back(Book(2, "三体", "刘慈欣", "文学", "重庆出版社", 29.0, 20, 20)); books.push_back(Book(3, "明朝那些儿", "当年明月", "历史", "湖南文艺出版社", 49.0, 15, 15)); books.push_back(Book(4, "经济学原理", "曼昆", "经济", "机械工业出版社", 99.0, 8, 8)); books.push_back(Book(5, "论语", "孔子", "哲学", "中华书局", 9.9, 30, 30)); books.push_back(Book(6, "心理学与生活", "吉列", "心理学", "人民邮电出版社", 39.0, 12, 12)); books.push_back(Book(7, "小学数学竞赛", "王德忠", "教育", "人民教育出版社", 25.0, 18, 18)); books.push_back(Book(8, "篮球技术与战术", "何勇", "体育", "北京体育大学出版社", 59.0, 5, 5)); books.push_back(Book(9, "内科学", "王振英", "医学", "人民卫生出版社", 129.0, 3, 3)); books.push_back(Book(10, "宪法", "钱穆", "法律", "北京大学出版社", 19.9, 25, 25)); } void Library::addBook() { int id, total, rest, typeId; string name, author, type, press; double price; cout << "请输入书籍编号:"; cin >> id; cout << "请输入书籍名称:"; cin >> name; cout << "请输入作者:"; cin >> author; cout << "请输入书籍类型(如:计算机):"; cin >> type; cout << "请输入出版社:"; cin >> press; cout << "请输入价格:"; cin >> price; cout << "请输入总数:"; cin >> total; cout << "请输入剩余数量:"; cin >> rest; // 查找图书类型 bool found = false; for (int i = 0; i < bookTypes.size(); i++) { if (bookTypes[i].getType() == type) { typeId = bookTypes[i].getId(); found = true; break; } } if (!found) { typeId = bookTypes.size() + 1; bookTypes.push_back(BookType(typeId, type)); } books.push_back(Book(id, name, author, type, press, price, total, rest)); cout << "添加成功!" << endl; } void Library::modifyBook() { int id; cout << "请输入需要修改的书籍编号:"; cin >> id; for (int i = 0; i < books.size(); i++) { if (books[i].getId() == id) { string name, author, type, press; double price; int total, rest, typeId; cout << "请输入书籍名称:"; cin >> name; cout << "请输入作者:"; cin >> author; cout << "请输入书籍类型(如:计算机):"; cin >> type; cout << "请输入出版社:"; cin >> press; cout << "请输入价格:"; cin >> price; cout << "请输入总数:"; cin >> total; cout << "请输入剩余数量:"; cin >> rest; // 查找图书类型 bool found = false; for (int j = 0; j < bookTypes.size(); j++) { if (bookTypes[j].getType() == type) { typeId = bookTypes[j].getId(); found = true; break; } } if (!found) { typeId = bookTypes.size() + 1; bookTypes.push_back(BookType(typeId, type)); } books[i] = Book(id, name, author, type, press, price, total, rest); cout << "修改成功!" << endl; return; } } cout << "未找到该书籍!" << endl; } void Library::deleteBook() { int id; cout << "请输入需要删除的书籍编号:"; cin >> id; for (int i = 0; i < books.size(); i++) { if (books[i].getId() == id) { books.erase(books.begin() + i); cout << "删除成功!" << endl; return; } } cout << "未找到该书籍!" << endl; } void Library::searchBook() { int id; cout << "请输入需要查找的书籍编号:"; cin >> id; for (int i = 0; i < books.size(); i++) { if (books[i].getId() == id) { cout << "编号\t书名\t作者\t类型\t出版社\t价格\t总数\t剩余数量" << endl; cout << books[i].getId() << "\t" << books[i].getName() << "\t" << books[i].getAuthor() << "\t" << books[i].getType() << "\t" << books[i].getPress() << "\t" << books[i].getPrice() << "\t" << books[i].getTotal() << "\t" << books[i].getRest() << endl; return; } } cout << "未找到该书籍!" << endl; } void Library::printBooks() { cout << "编号\t书名\t作者\t类型\t出版社\t价格\t总数\t剩余数量" << endl; for (int i = 0; i < books.size(); i++) { cout << books[i].getId() << "\t" << books[i].getName() << "\t" << books[i].getAuthor() << "\t" << books[i].getType() << "\t" << books[i].getPress() << "\t" << books[i].getPrice() << "\t" << books[i].getTotal() << "\t" << books[i].getRest() << endl; } } void Library::sortById() { sort(books.begin(), books.end(), [](Book a, Book b) { return a.getId() < b.getId(); }); } void Library::sortByName() { sort(books.begin(), books.end(), [](Book a, Book b) { return a.getName() < b.getName(); }); } void Library::saveToFile() { ofstream outfile("books.txt"); for (int i = 0; i < books.size(); i++) { outfile << books[i].getId() << " " << books[i].getName() << " " << books[i].getAuthor() << " " << books[i].getType() << " " << books[i].getPress() << " " << books[i].getPrice() << " " << books[i].getTotal() << " " << books[i].getRest() << endl; } outfile.close(); outfile.open("booktypes.txt"); for (int i = 0; i < bookTypes.size(); i++) { outfile << bookTypes[i].getId() << " " << bookTypes[i].getType() << endl; } outfile.close(); cout << "保存成功!" << endl; } void Library::readFromFile() { ifstream infile("books.txt"); int id, total, rest; string name, author, type, press; double price; while (infile >> id >> name >> author >> type >> press >> price >> total >> rest) { // 查找图书类型 int typeId; bool found = false; for (int i = 0; i < bookTypes.size(); i++) { if (bookTypes[i].getType() == type) { typeId = bookTypes[i].getId(); found = true; break; } } if (!found) { typeId = bookTypes.size() + 1; bookTypes.push_back(BookType(typeId, type)); } books.push_back(Book(id, name, author, type, press, price, total, rest)); } infile.close(); infile.open("booktypes.txt"); int typeId; while (infile >> typeId >> type) { bookTypes.push_back(BookType(typeId, type)); } infile.close(); cout << "读取成功!" << endl; } int main() { Library library; library.init(); int choice; while (true) { cout << "请选择操作:" << endl; cout << "1.添加书籍" << endl; cout << "2.修改书籍" << endl; cout << "3.删除书籍" << endl; cout << "4.查找书籍" << endl; cout << "5.输出所有书籍信息" << endl; cout << "6.按编号排序" << endl; cout << "7.按书名排序" << endl; cout << "8.保存到文件" << endl; cout << "9.从文件中读取" << endl; cout << "0.退出" << endl; cin >> choice; switch (choice) { case 1: { library.addBook(); break; } case 2: { library.modifyBook(); break; } case 3: { library.deleteBook(); break; } case 4: { library.searchBook(); break; } case 5: { library.printBooks(); break; } case 6: { library.sortById(); break; } case 7: { library.sortByName(); break; } case 8: { library.saveToFile(); break; } case 9: { library.readFromFile(); break; } case 0: { cout << "谢谢使用!" << endl; return 0; } default: { cout << "输入有误,请重新输入!" << endl; break; } } } return 0; } ``` 以上就是完整的代码实现了。这个图书管管理系统包含了建立书籍类、图书类型类、图书类,书籍、图书类型、图书信息的初始化、添加、修改、删除、查找,图书信息的输出,对图书信息按编号、书名排序,文件的保存和文件的读取。您可以根据需要进行修改和扩展。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值