static void main(String ``Faggots") {
new ``Faggot"(){
public void die() {
suicide;
}
};
}
how would i port the following code to c++? mainly the part inside static void main method.
Name:
Anonymous2011-08-09 12:36
Sepples Eleven from Java direction translation version:
class Faggot
{
public:
virtual void die() = 0;
};
int main(int argc, char* argv[]) {
class DummyFaggot : public Faggot
{
public:
virtual void die() override {
suicide();
}
};
DummyFaggot f; // no need to use the heap, that's for bakas!
return 0;
}
Sepples Eleven non-faggot translation version (considering the original program is essentially a no-op):
int main(int argc, char* argv[]) {
return 0;
}
Forgot to mention to all of the other posters, but when does the die method on the faggot anonymous class actually get called? It doesn't. He's just creating object on the GC heap of that anonymous type, that's all. So why are you all calling die in your posts? Am I the only one who can program in both Java and C++ (including Sepples Eleven).
Name:
Anonymous2011-08-09 18:55
JESUS CHRIST YOU FUCKING RETARD, YOU CLOSE \`\`PROPER QUOTES\'\' WITH TWO APOSTROPHES.