定义一个Document类
定义一个Document类,包含成员变量name,从Document派生出Book类,增加PageCc++:定义一个Document类,包含成员变量name,从Document派生出Book类,增加PageCount变量。编写主函数测试这两个类
classDocument{public:`...... };classDocument{ :intPageCount;......};voidmain(){DocumentDt;BookBk;......}因为不清楚你需要什么具体的操作,所以只能用"..."代替具体函数
问:挺简单的一C函数,不过我是初学者,暂时还不会写,请好心人多多帮忙!
答:int mystrlen(char *str) { int n = 0; while (*str) { n++; str++;} return n; } voi...详情>>