将长为15cm的木棒截成长度为整数的三段,使它们构成一个三角形的三边,则不同的截法有[ ]
A.5种
B.6种
C.7种
D.8种
答案:C
有以下程序#include <iostream>using namespace std;class Base int a;public: Base(int x) a=x; void show() cout<<a; class Derived: public Base int b;public: Defived(int i):Base(i+ 1 ),b(i) void show() cout<<b; ;int main() Base b(5),*pb; Derived d(1); pb=&d; pb->show(); return 0;运行后的打印结果是______。