Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <ctime>
- using namespace std;
- //class Person {
- //public:
- // Person(string name, string lastName) : mLastName(lastName), mName(name) {
- //// cout << "My Name: " << mName << '\n';
- //// cout << "My Surname: " << mLastName << '\n';
- // }
- //
- // ~Person() {
- //// cout << "I'm out!" << '\n';
- // }
- //
- // virtual void printInfo() {
- // cout << mName << ' ' << mLastName << '\n';
- // }
- //
- //protected:
- // string mName;
- // string mLastName;
- //};
- //
- //class Worker : public Person {
- //public:
- // Worker(string name, string surname, int salary, string jobTitle) : Person(name, surname), mSalary(salary), mJobTitle(jobTitle) {
- //// cout << "I'm a " << mJobTitle << '\n';
- //// cout << "I grind " << mSalary << '\n';
- // }
- //
- // ~Worker() {
- //// cout << "I'm out as a worker!" << '\n';
- // }
- //
- // void printInfo() {
- // cout << mName << ' ' << mLastName << ' ' << mSalary << ' ' << mJobTitle << '\n';
- // }
- //
- //protected:
- // int mSalary;
- // string mJobTitle;
- //};
- //
- //void outerInfo(Person *person) {
- // person->printInfo();
- //}
- //struct A {
- // virtual void printOnes() {
- // cout << "A";
- // }
- // virtual void printTwice() {
- // cout << "AA";
- // }
- //};
- //struct B : public A {
- // void printOnes() {
- // cout << "B";
- // }
- // void printTwice() {
- // cout << "BB";
- // }
- //};
- //void print(A &a) {
- // a.printOnes();
- // a.printTwice();
- //}
- //
- //class Animal {
- //public:
- // virtual void makeSound() = 0;
- //};
- //
- //class Fish : public Animal {
- //public:
- // void makeSound() override {
- // cout << "..." << '\n';
- // }
- //};
- //class Fox : public Animal {
- //public:
- // void makeSound() override {
- // cout << "Fr fr fr" << '\n';
- // }
- //};
- //class Bear : public Animal {
- //public:
- // void makeSound() override {
- // cout << "Abrrrrrrr grararararararaaarara" << '\n';
- // }
- //};
- //
- //void sound(Animal *animal) {
- // animal->makeSound();
- //}
- //class Enemy {
- //public:
- // Enemy (string name, int health, int armour, int damage, double range) : mName(name), mHealth(health), mArmour(armour), mDamage(damage), mRange(range) {}
- //
- // virtual void attack() = 0;
- //
- //protected:
- // string mName;
- // int mHealth;
- // int mArmour;
- // int mDamage;
- // double mRange;
- //};
- //
- //class Creeper : public Enemy {
- //public:
- // Creeper (string name, int health, int armour, int damage, double range) : Enemy(name, health, armour, damage, range) {}
- //
- // void attack() override {
- // cout << "Silently move to player" << '\n';
- // cout << "Then BOOOOOOOOOOOOOOOOM!" << '\n';
- // }
- //};
- //
- //class Skeleton : public Enemy {
- //public:
- // Skeleton (string name, int health, int armour, int damage, double range) : Enemy(name, health, armour, damage, range) {
- // if (rand() % 2 == 0) {
- // mBow = "Common bow";
- // } else {
- // mBow = "127 lvl bow";
- // mDamage *= 1000;
- // }
- // }
- //
- // void attack() override {
- // cout << "Shot at the player with " << mBow << "!!!" << '\n';
- // }
- //
- //private:
- // string mBow;
- //};
- //
- //Enemy *spawner() {
- // Enemy *enemy = nullptr;
- //
- // if (rand() % 2 == 0) {
- // enemy = new Skeleton("s", 10, 0, 10, 100);
- // } else {
- // enemy = new Creeper("c", 10, 0, 100, 5);
- // }
- // return enemy;
- //}
- int main() {
- long double a = 1.123456789123456789;
- cout << boolalpha << setbase(16) << 16 << ' ' << true << ' ' << false << '\n';
- cout << setw(50) << setfill('#') << setprecision(19) << a;
- // srand(time(nullptr));
- //
- // for (int i = 0; i < 5; ++i) {
- // Enemy *enemy = spawner();
- // enemy->attack();
- // }
- // Fish fish;
- // Fox fox;
- // Bear bear;
- //
- // sound(&fish);
- // sound(&fox);
- // sound(&bear);
- // Worker worker("Noname", "Untitled", 123, "None");
- // outerInfo(&worker);
- // A a;
- // B b;
- // print(b);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement