it’s not monospaced; my eyes

@aggelalex@lemmy.world
creator
link
fedilink
101Y

Peak shittiness requires sacrifice

I see there an access violation…

CriminalScrum

It’s my property tho

this

@ooterness@lemmy.world
link
fedilink
English
91Y

STOP! You have violated the law. Pay the court a fine or serve your sentence. Your stolen goods are now forfeit.

I can legally destroy my own private property thank you very much

Horrible code. First, it doesn’t compile because there’s no ; at the end of the class definition.

And then more importantly you have a private destructor which means this CriminalScum’s destructor will never be called, so you can’t charge it with distruction either. Or are you telling me this CriminalScum has friends?

Also, if I’m not mistaken the uninitialized prop is not guaranteed to be nullptr here, so this private destructor could be trying to free from some random pointer.

wait, in C++, if you don’t assign the value to that pointer, it’ll be whatever happens to be at that block of memory of something!?

Yep, variables that are merely declared are not initialized, so their value is not guaranteed. Could be anything.

Correct me if I’m wrong, but I’m pretty sure some compiler settings can change this. I have a fuzzy memory of a bug that went away when compiled with debug flags enabled and the difference was that unassigned variables were being zeroed vs not zeroed.

Yes, actually at my job a co-worker just found exactly such a bug yesterday: Debug build zeroed out the variable and the release build didn’t. So the bug only occurred in the release build, but could not be reproduced on the debug build where the developers work on. So in the end he found it because of the different compiler flags used for debug vs release builds at our work place.

@aggelalex@lemmy.world
creator
link
fedilink
16
edit-2
1Y

There’s always an accomplice in crime.

Also, tall order to expect me to run and test a code written only for a shitpost.

You’re charging the class for a thought crime!!

Right to remain silent isn’t granted to criminal scum, they have to either pay the court a fine or serve their sentence, and their stolen goods are now forfeit.

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 38 users / day
  • 138 users / week
  • 529 users / month
  • 2.24K users / 6 months
  • 1 subscriber
  • 1.68K Posts
  • 37.1K Comments
  • Modlog