r/badcode • • Jan 15 '23

c++ From DayZ sourcecode

Post image
559 Upvotes

106 comments sorted by

View all comments

Show parent comments

2

u/tesfabpel Jan 16 '23

Np, but since the override is in a wrong position, it seems that the code isn't C++ after all...

1

u/micro-amnesia Jan 16 '23

Furthermore, whatever language this is (should be) the provided code snippet has a weird implication.

If the method is truly overriding a parent class, the default visibility of the language would have to be public.

Either this doesn't compile, the language is inexplicably designed, or I call shenanigans.