25

//Proof that C++ is godly !

auto water = new Water();
auto wine = reinterpret_cast<Wine>(water);

//Ha ha

Comments
  • 7
    And then Jesus said, "Segmentation fault (core dumped)", and all were amazed.
  • 2
    let water = wine;
  • 1
    Truly inspired! 😁
  • 0
    Isn't it the same as casting it to void* and then back to Wine?
  • 1
    What you have done is like putting purple cellophane on water and saying "That's wine over there!"
  • 1
    @itamariuser You can also criticise that "water" is a pointer, while "wine" is not, so the cast wouldn't work anyway. πŸ˜‰

    Luckily this is not about correct syntax. 😁
Add Comment