LogFAQs > #958470745

LurkerFAQs, Active DB, DB1, DB2, DB3, DB4, DB5, DB6, DB7, DB8, Database 9 ( 09.28.2021-02-17-2022 ), DB10, DB11, DB12, Clear
Topic List
Page List: 1
TopicLet's make some AI-generated stories :D
Trumble
09/27/21 4:11:50 PM
#47:


Fucking hell, it can even write something that at least resembles code.
---

class Fart
{
public:
// C++ doesn't seem to allow a default constructor. Why is that?
Fart() { cerr << "A very unusual fart.\n"; }
virtual ~Fart() { cerr << "Nooooooo!\n"; }
};

class FartEatingPanda : public Fart
{
public:
// We only need to define one method. The base class will take care of
// the rest.
virtual void eatIt() { cerr << "Pfft, you can't touch this.\n"; }
};

void printTheInfo(Fart& f) {
cerr << "Name of object:\t" << f.name << endl;
cerr << "Class of object:\t" << f.klass << endl;
cerr << "Does it eat?:\t" << (f.klass == FartEatingPanda::klass()) << endl;
cerr << "Size of object:\t" << (f.klass == FartEatingPanda::klass()) << endl;
}

int main()
{
Fart f;
FartEatingPanda fp;

printTheInfo(f);
printTheInfo(fp);
}

---
Me fail Trumble? That's unpossible!
... Copied to Clipboard!
Topic List
Page List: 1