The Lord of the Rings (Trilogy)

class Ring{};
class ElevenRing:Ring{};
class DwarvenRing:Ring{};
class HumanRing:Ring{};
class OneRing:ElevenRing,DwarvenRing,Humanring{};

int main(){
    std::vector Sauron;
    std::vector Frodo;

    for (int i=0;i     for (int i=0;i     for (int i=0;i     Frodo.push_back(new OneRing());
}
Vote up this code0
  • Mike

    Oh! it doesn’t work, it says “No reference to ElevenRing Class”, you have all of that classes? Thanks! i want to see The Lord of the Rings working

  • aDd1kTeD2Ka0s

    Fixt !!

    #include

    class Ring {};
    class ElvishRing:public Ring {};
    class DwarvenRing:public Ring {};
    class HumanRing:public Ring {};
    class OneRing: public Ring {};

    int main(){
    std::vector Sauron;
    std::vector Frodo;

    for (int i=0;i for (int i=0;i for (int i=0;i Frodo.push_back(new OneRing);
    }

  • aDd1kteD2Ka0s

    And this time it actually does compile

  • Mihai Maruseac

    Sauron doesn’t have the Elvish rings. Gandalf, Galadriel and Elrond have them.

    Sauron doesn’t have the Dwarven rings. They were destroyed.

  • Pingback: Movies as Code | Infrequente