string常用成员函数 std::string::clear Clear string Erases the contents of the string, which becomes an empty string (with a length of 0 characters). Parameters none Return value none Example // string::clear #include <iostream> #include <string> int…
/* 样例1: class Parent{ int num = 3; } class Child extends Parent{ int num = 4; } */ /* 样例2: class Parent{ } class Child extends Parent{ int num = 4; } */ /* 样例3: class Parent{ void show(){ System.out.println("Parent Show!"); } } class Child exten…