Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- class Human
- {
- private:
- string name;
- public:
- Human(string name) : name(name) { }
- virtual void show();
- };
- void Human::show()
- {
- cout << "Human: " << name << endl;
- }
- class Student : public Human
- {
- private:
- string schoolName;
- public:
- Student(string name, string schoolName) : Human(name), schoolName(schoolName) { }
- void show();
- };
- void Student::show()
- {
- Human::show();
- cout << "Student: " << schoolName << endl;
- }
- int main()
- {
- int foo[2] = [1, 2];
- cout << foo[1] << foo[2] << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement