Stop using these wrong.

  Рет қаралды 10,990

Nathan Baggs

Nathan Baggs

Күн бұрын

Пікірлер: 20
@demikr8115
@demikr8115 Жыл бұрын
I’d definitely be interested in a video on what every version of C++ adds fundamentally if that makes sense? Like C++11, C++17, etc. specifics
@nathanbaggs
@nathanbaggs Жыл бұрын
That’s actually on my idea list!
@alicewyan
@alicewyan 11 ай бұрын
@@nathanbaggs as a lapsed C++ programmer (stopped in 2013 and didn't fully learn C++11), I'd love to watch that video, I sometimes think of updating my C++ knowledge but not sure how to get started, it's overwhelming!
@suncrafterspielt9479
@suncrafterspielt9479 Жыл бұрын
Your videos are insanely useful. Usually content on youtube only scratches the surface in my experience
@damouze
@damouze 10 ай бұрын
While my main programming language of choice is plain old C, sometimes I do de(vo)lve into C++. I never understood the benefit of references compared to pointers (and I still don't, but that's not on you), but then again I maybe old-fashioned. I _want_ my objects to be nullable because that's the main way I signal to the caller that something went awry. Maybe I am a poor old sod who refuses to know any better ;-) I found your video interesting and it did clear up a couple of things. Even in my university days when I first learned C++, references were an obscure abstract topic that neither the professor nor my fellow-students (who were way more proficient with the language than I was) were willing to discuss. The same applied to templates. So I left them alone and instead continued to code in C and assembly.
@NonTwinBrothers
@NonTwinBrothers Жыл бұрын
Just discovering this channel. You're pretty good at explaining C++ concepts! (no pun intended) I think you could do a video where you take some code (create_enitity for example) and "work up" to the final implementation. Like starting with the basic idea, and then changing the pointer to unique, explain the move semantics, etc.
@NeuwDk
@NeuwDk Жыл бұрын
I sometimes use std::optional instead of pointers when I need the equivalent of a nullable pointer. I don't know if it's a good idea, but somehow I tell myself that the type-system is holding my hand more when doing this, compared to a raw pointer.
@florian3421
@florian3421 Жыл бұрын
Very cool video! I'm currently looking a lot into how all the low level stuff works under the hood because its very interesting to me but find it quite hard to find good learning resources about some of it and your channel has helped me a lot. Would be really awesome if you could make a video about windows PE executables where you explain how they are structured and go through every byte of a very simple and small executable which e.g. just returns exit code 0 or some. Thanks!
@nathanbaggs
@nathanbaggs Жыл бұрын
Glad you’re finding it useful, thanks for the idea!
@saultube44
@saultube44 Жыл бұрын
Copying a passing value, That's an error, you can address its value directly, in a Data Segment
@sharpfang
@sharpfang 11 ай бұрын
Interestingly, Java references are much more similar to C++ references, just wrapped in a dereferencing syntactic sugar hiding the pointer underneath.
@weckar
@weckar Жыл бұрын
Just use a reference to a pointer. Easy peazy lemon cheesy
@svenlamberti
@svenlamberti 4 ай бұрын
Shouldn't the body of the cmp_ptr(int* a, int* b) be return *a == *b; ?
@nathanbaggs
@nathanbaggs 4 ай бұрын
The point (excuse the pun) is that directly comparing pointers compares whether the addresses are the same, whereas with references the value of the two objects are compared
@alexxv.1519
@alexxv.1519 11 ай бұрын
The biggest offender is the ampersand and ptr on the side of the variable name
@steevevinson
@steevevinson Жыл бұрын
Please never stop thx
@skeleton_craftGaming
@skeleton_craftGaming 11 ай бұрын
I mean, ideally what you would do is make a wrapper in class for unique pointer that statically asserts that it's not null at construction time...
Can you fit a whole game on a stamp?
8:27
Nathan Baggs
Рет қаралды 75 М.
Stop using std::vector wrong
23:14
The Cherno
Рет қаралды 153 М.
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 262 МЛН
Long Nails 💅🏻 #shorts
00:50
Mr DegrEE
Рет қаралды 20 МЛН
How Many Balloons To Make A Store Fly?
00:22
MrBeast
Рет қаралды 173 МЛН
EQUILIBRIUM OF FORCES & PRINCIPLE OF MOMENT
1:30:48
Academic Daddy
Рет қаралды 1
Master Pointers in C:  10X Your C Coding!
14:12
Dave's Garage
Рет қаралды 330 М.
Hacking a Game From 2000 To Run On Windows 11
16:22
Nathan Baggs
Рет қаралды 68 М.
STOP Using Classes In JavaScript | Prime Reacts
14:02
ThePrimeTime
Рет қаралды 251 М.
EA Won’t Sell This Game - So I Hacked It
18:31
Nathan Baggs
Рет қаралды 268 М.
31 nooby C++ habits you need to ditch
16:18
mCoding
Рет қаралды 831 М.
What's inside my game engine?
8:45
Nathan Baggs
Рет қаралды 17 М.
Reverse Engineering RollerCoaster Tycoon | How does it work?
38:54
Nathan Baggs
Рет қаралды 265 М.
"Clean" Code, Horrible Performance
22:41
Molly Rocket
Рет қаралды 914 М.
C++ vs Rust: which is faster?
21:15
fasterthanlime
Рет қаралды 405 М.
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 262 МЛН