Ludovic 'Archivist'
you cannot const a pointer's pointee
Anonymous
you cannot const a pointer's pointee
you cannot do this for a reference either
Anonymous
so if i take the address of a reference value
Mat
#cpp
Marie
https://t.me/programminginc/24103
Anonymous
change it from const to normal
Ludovic 'Archivist'
because for a reference, operator's constnesses are to be preserved
Anonymous
and then use it that way
Ludovic 'Archivist'
Mat
Really, learning how to do proper queries in google is important
Anonymous
then you are doing C in C++
but it will work to modify the under lying structure
Anonymous
so your basis is wrong
Ludovic 'Archivist'
Anonymous
MᏫᎻᎯᎷᎷᎬᎠ
U can change the value of a variable that's refered by a const reference
Anonymous
and it working is the only important thing
MᏫᎻᎯᎷᎷᎬᎠ
🎃
Anonymous
you saying it is impossible is purely wrong
Anonymous
any bug that exists from the C method still stays in the C++ method
Ludovic 'Archivist'
and it working is the only important thing
then sorry to tell you, but (int*)0=9; is also valid in C
Ludovic 'Archivist'
any bug that exists from the C method still stays in the C++ method
You should never use the C subset of C++ in C++
Anonymous
i used this a lot to fuck with people
Ludovic 'Archivist'
C++ guidelines dude
Anonymous
i used this a lot to fuck with people
i got the stack offset and use that to find the variable i wanted to modify
Ludovic 'Archivist'
i used this a lot to fuck with people
That is why I say since 1h you are a dumb fuck that should not be allowed to work anywhere near code xD
Anonymous
and then i did (type*) ((uint8_t*) main + 0xXXX) = ...
Anonymous
That is why I say since 1h you are a dumb fuck that should not be allowed to work anywhere near code xD
i only fuck with people to show them they do not understand their own programming langauge
Anonymous
in each language there are always issues
Anonymous
which can arise
Anonymous
that will ALWAYS be hazardous to new people
Ludovic 'Archivist'
And C get the palm of it not having corrected one in 30 years
Anonymous
C++ is a shit langauge for this
Anonymous
Ludovic 'Archivist'
that will ALWAYS be hazardous to new people
It need to be taugh right, not by someone who takes pointers for an important part of the language
Ludovic 'Archivist'
they are VERY important
Like a bulldozer in a construction site, and you don't give bulldozers to any man on the site
Anonymous
but i would
Anonymous
would be funny
Ludovic 'Archivist'
would be funny
Yeah, and can kill people eventually
Anonymous
and construction sites are paid for by taxpayers
Anonymous
so i do not care
Ludovic 'Archivist'
Anonymous
mmmh nope, only public ones
yep but that is pretty much every one
Ludovic 'Archivist'
Unless taxpayers pay for your house
Anonymous
Unless taxpayers pay for your house
taxpayers do subsidize new communities to a degree
Anonymous
just enough to cover certain areas
Ludovic 'Archivist'
Anonymous
Well, not in most countries dude
Canada and i am SURE the US
Ludovic 'Archivist'
Canada and i am SURE the US
but never in europe, nor asia
Ludovic 'Archivist'
would be funny
btw, this is the blabbering of a psychopath, I encourage you to stop that
Ludovic 'Archivist'
WHOA THIS IS RUDE
This is talking lightly about critical risks
Anonymous
Anonymous
i do worse actually but that will make you think i am fully psychopathic
Ludovic 'Archivist'
the day one will tell you your bad jokes in C code have killed someone due to a disfunction of medical hardware, or the day your wife or son is killed by such a flaw, you will think back about it
Ludovic 'Archivist'
And I can tell you I have seen this shit happen
Anonymous
i have seen a fuckup in PLC logic that broke an airplane and airplane hanger
Anonymous
all because someone changed a minus sign
Anonymous
i laughed but kept it inside me
Ludovic 'Archivist'
and neither a Tiobe check nor an ASIL cert on your compiler change a thing
Anonymous
functional
Ludovic 'Archivist'
Use the right tool at the right place
Anonymous
functional allows for a wider set of problems to solve then object oriented
Anonymous
of course anything done in one paradigm can be done in another one
Ludovic 'Archivist'
Anonymous
not really as functions can be objects
and objects can be functions
Ludovic 'Archivist'
and vice-versa
Anonymous
look into lambda calculus
Ludovic 'Archivist'
look into lambda calculus
don't take me for a beginner
Ludovic 'Archivist'
I have 10 years in the industry
Anonymous
i forget how many years i have
Anonymous
i know for sure over 7
Anonymous
but never really count
Anonymous
because it is boring shit
Ludovic 'Archivist'
And you are still unhireable imo
Anonymous
Anonymous
so completely different field and questions are needed