C面向对象程序设计教程第版陈维兴林小茶课后习题答案及解析

发布时间 : 星期一 文章C面向对象程序设计教程第版陈维兴林小茶课后习题答案及解析更新完毕开始阅读

if(str[i] != 0 && (str[i] < 'A')) {

str[i] += ('A' - 'a'); } }

fstream out(\, ios::app); if(!out) {

cout << \打开文件file2.txt失败!\\n\; abort(); }

out >> str; in.close(); out.close(); return 0; }

7.15 不会。

#include #include \ #include \ using namespace std;

class order {

private:

int orderID; int buyerID; int listcount;

string orderlist[20]; static int ordercount; public:

order(buyer &person, book &b[], int bookNumber) {

ordercount++;

orderID = ordercount; buyerID = person.buyerID; listcount = bookNumber;

for(int i = 0; i < bookNumber; i++) orderlist[i] = b[i].book_ID; }

void show() {

cout << \订单编号: \ << orderID << \购书人编号: \ << buyerID << \购书数量: \ << listcount << endl; for(int i = 0; i < listcount; i++)

cout << \书号: \ << orderlist[i] << endl;; } };

int order::ordercount = 0;

int main() {

book *c[20];

book c1(\, \程序设计\, \谭浩强\, \清华\, 25); book c2(\, \程序设计\, \谭浩强\, \清华\, 28);

c[1] = &c1; c[2] = &c2;

layfolk b1(\林晓茶\, 1, \北京\, 0); order ord(b1, c, 2); order.show(); return 0; }

1、尊老爱幼是每一个人都应该去做的,让我们大家要从现在做起,从自己做起,从身边的每一件小事做起,做一个尊老爱幼的模范;积极、勇敢地接过先辈们尊老爱幼的接力棒,把祖祖辈辈这一光荣传统,一代一代传下去……在这天高云淡、秋风飒爽的季节,让我们共同祝愿天下所有的老人都能幸福、安康,让我们共同祝愿天下所有的少年儿童都能健康、快乐!谢谢大家

联系合同范文客服:xxxxx#qq.com(#替换为@)