C++ for C# and Java Developers

  Рет қаралды 23,141

ABMedia

ABMedia

Күн бұрын

This video will cover all of the difficult topics and differences between C++ and a managed language such as C# or Java. Things such as Pointers, Heap and Stack, Header Files and so much more!
I made this video because as I got into C++ (coming from a C# background) a lot of these topics were really confusing to me and there weren't many great videos on the subject. I've designed this video to be exactly what I needed to properly push me off into developing in C++ back when I started, in the hope that you can hopefully get into C++ much quicker. This video also helps give you insight into the language C too, as C++ is essentially an extension on top of C.
USEFUL ARTICLES:
►References vs Pointers - stackoverflow.com/questions/7...
►Position of the "*" for pointers - stackoverflow.com/questions/2...
►Passing NULL to delete - stackoverflow.com/questions/4...
BREAKDOWN:
The video starts by covering the differences between the compilation process for C++ vs C#/Java. C++ is significantly less "smart" than those languages and most notably doesn't see your entire project and all its files as one, but rather as individual files that are each processed, and then unintelligently combined through something called a "linker". And that leads us very quickly onto header files, which are necessary to make up for this limitation and are a staple of C++ programming.
We then continue to look at the most central thing of all of C++: Pointers. You'll hear about them everywhere, and C# technically even has them, but I cover them in enough detail here to really understand the concept behind them and why it's dangerous.
After that, I cover the difference between the heap and stack, which is once again something that you can apply to your C# and Java when looking at performance. I go into what the difference between is and what operations work with each, as well as why you'd use one or the other.
And finally, I cover the equivalent of arrays C++ has and how to work with them (hint: they're really just pointers all over again.)
I also won't cover absolutely everything there is to know, and I left the end fairly open for you to explore (e.g. vectors and strings) because that is always the best way to learn. But, this does cover the BIGGEST differences that aren't so easy to "explore" on your own or so obviously at first.
A good place to go from this video is to take a look at "The Cherno Project", there are fantastic videos about C++ there, so that might be a good place to go to next as you start to "explore" everything on your own. Channel is here: / thechernoproject
Thanks for watching my video, all videos should have subtitles on them - if one doesn't, please tell me immediately on the Discord server below and I'll get to work.
Chapters:
0:00 Compiler & Linker
2:40 Header Files
7:38 Pointers
18:48 Heap & Stack
32:30 Arrays
37:28 Class Syntax
Website ► abco.live/
Discord ► abco.live/discord
Community Contributions are off since I make the subtitles myself anyway ;)
#cpp #csharp

Пікірлер: 233
@jonathonquick2270
@jonathonquick2270 4 жыл бұрын
This deserves more views. It is to the point without fluff. You keep saying it was getting long but I think a lot of other people would take longer to explain the same concepts, and yet you still managed to actually explain everything clearly. I did have to pause and re-watch the part about the stack but I really learned a lot from watching this. Thank you :)
@ABCo-ABMedia
@ABCo-ABMedia 4 жыл бұрын
Thanks for the feedback! I just re-watched the stack part and I do agree that I should've explained that part simpler, it was a little bit too confusing! Also, I'm sorry about the echo and me cutting off the ends of most lines in this video, both of those have been fixed for future videos. Please feel free to tell me what other topics you would like me to cover. I know the most about C#, C++, HTML/CSS/JS and Assembly, so any topics in those sorts of areas I would happily look into covering :)
@rdawson3648
@rdawson3648 2 жыл бұрын
@@ABCo-ABMedia How about interfacing C++ from/to C# ?
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
@@rdawson3648 Sure thing! Once I'm finished with the PowerShell series I'm doing now, I'm going to start focusing my channel's attention over to primarily .NET internals and more advanced C# topics like that. And interfacing between C++ and C# _definitely_ sounds like something that would fit the general theme of that. It may take a while for me to get to it, as there are still a few PowerShell videos to go, but I'll keep your suggestion in mind!
@omg33ky
@omg33ky Жыл бұрын
@@ABCo-ABMedia I would also like to see that video and hope it's still planned
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
@@omg33ky Yep, still got plans to make all these! I've been really pre-occupied with some other stuff but I want to pick ABMedia back up soon, and when I do I've got two videos on PowerShell left, and then... It's all .NET internals from there on out!
@ZhirniToni
@ZhirniToni 2 жыл бұрын
This is brilliant! Perfect clarification material for java programmer, such as myself, who knows all the "basic" stuff and just wants to understand difference in principals. 10/10 😍
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Glad you found it helpful!
@rogerr4469
@rogerr4469 Жыл бұрын
This is by far the best C++ introduction video I have ever found. As a reasonably advanced C# developer, I always tend to loose my concentration with these kind of topics because they often are too simple and go over stuff I already know, but this one is perfect. I hope to see more advanced videos of C++ from you. As a kid I programmed a lot in Borland Turbo Assembler but once we got Windows 95 and protected mode everything changed and I basically had to start from scratch all over again, therefore I kind of lost interest in it. Lately I rediscovered programming at a low level again and I'm trying to learn C++ and, perhaps, assembly language again just because it is way more fun then C# with all its abstractions, packages and other under the hood stuff I cannot control. If you ever find the time and its fun for you I would love to see an introduction video on assembly language and how it's done nowadays. Anyway, thank you very much for this video, it really made my day!
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
Thanks, I'm glad you like it! So, the plan for the channel is I'm going to get the PowerShell series done, and then from there I'm actually going to specially focus on lower-level concepts with respect to C#. How various pieces of .NET internally works, how to write high-performance code in it, an analysis of stuff like JIT output (which will involve me looking at assembly) etc. That's the current plan, but there's always room for more C++ things at some point
@rogerr4469
@rogerr4469 Жыл бұрын
@@ABCo-ABMedia That sounds great, I'm looking forward to it. The PowerShell series seem interesting too, I'm trying to do more stuff with the command prompt lately instead of letting Visual Studio handle everything for me, like GIT actions for example, so I'll watch them in the near future.
@miguelrochefort
@miguelrochefort 3 жыл бұрын
Excellent! This video exceeded my expectations. You basically answered 100% of my questions.
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Glad it was helpful!
@julinaut
@julinaut 2 жыл бұрын
100% agree, far more understandable than I expected
@blockify
@blockify 8 ай бұрын
This video is perfect for intermediate developers like myself, to just learn the foundation of c++ and not just “how to print hello world” etc
@OhHiMarsh
@OhHiMarsh 6 ай бұрын
Starting a new job in C++ in a month coming from C#, thanks for the great video homie!
@El_Poro
@El_Poro 2 жыл бұрын
Amazing content man! I have always been a mid/high level developer (C#, Kotlin, Javascript, etc.) and am getting into C++ for Unreal, but thanks to this kind of explaniations I am becoming a C++ lover. Suscribers++
@fabyr_
@fabyr_ 3 жыл бұрын
Why does your video only have about 1k views? As a moderately experienced C# developer (hobbyist) i found this extremely helpful. It's not too long at all and pretty much everything i struggled with at the beginning makes sense now. There are not a lot of videos like these, the ones that cover C++ are usually from a beginners point of view and cover everything including basics, which someone who already has experience in higher-level and managed languages already knows. Keep it up you got a sub. 👍👍👍
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Thanks a lot, I'm glad you found it useful! And about the 1K views, it takes for these things to grow, but I don't mind. I do also think the sound in this particular video is very off-putting for many people, there's an unintentional echo on the vocals, and at some points I cut the ends of lines off too quickly, I was editing too close to the speech. I fixed those for future videos, but that probably doesn't help.
@omerkeidar95
@omerkeidar95 2 жыл бұрын
this was extremely helpful, thank you! I've been studying both Java in a strict and organized course, and C++ pretty much independently. this has made so many things make much more sense to me in both especially in why the differences are the way they are.
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Glad to hear it!
@devloops1
@devloops1 Жыл бұрын
One of the best that I've ever seen for java programmers learning C++. Thank you so much for this and keep doing it!
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
Glad you enjoyed it!
@rasoolrahmanzadeh5975
@rasoolrahmanzadeh5975 3 жыл бұрын
The first thing to watch here is your brilliant talent in teaching. Good luck in your life.
@redundantpancake
@redundantpancake 2 жыл бұрын
Wow, as someone who has written C# for 4 years this actually made sense. Always wanted to get into c++ but seemed daunting. But honestly it seems a lot simpler and intuitive that I thought. Great explanation on pointers. Looking forward to prototype in c++!
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Great! That's exactly the intention of the video, to help make C++ feel more accessible to C# developers! By the way, even if you don't write C++ code, a lot of the info learned here can also be carried over to C#, since C# has pointers in the form of unsafe and the stack vs heap isn't any different in C#, the only difference is in C# the way it works is "reference types" (classes) are passed around as pointers to the heap and "value types" (structs) always have their contents placed where you put them (be it on the stack if they're in a local variable, or in the middle of a class on the heap if they're in a class), so that's something to think about!
@graceoverall
@graceoverall 2 жыл бұрын
Same here. It's like a paradigm shift though, and we'd have to be extra careful to consider the pitfalls outlined in this video when writing actual C++ code. Memory leaks scare me, LOL.
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
@@graceoverall Yep, you do definitely have to be very careful! It's why I prefer C# first for most things, and only use C++ if it really is suited to a given task.
@graceoverall
@graceoverall 2 жыл бұрын
@@ABCo-ABMedia Aye! I'm considering applying for a position at my company where I'd be maintaining a fairly mature low level software written largely in C++, but as a C# dev with no real experience in C++, so I came here to see if that's a realistic endeavor. I'm still assessing. 😉
@Gruggo
@Gruggo 2 жыл бұрын
this is an excellent video for C# devs, well done, thank you.
@handlecantbelongerthan30chars9
@handlecantbelongerthan30chars9 2 жыл бұрын
Woah. that was quick. After 5 minutes, I learned more about C++ than I did in other beginner tutorials. Thank you so much!
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Yeah well, that's why I made this video - there are lots of beginners tutorials out there but if you're always experienced with C# or Java you don't need that, you just need to learn the differences
@nickhahn3276
@nickhahn3276 2 жыл бұрын
Great stuff man. Straight to the point, no fluff. So much better than having to go through coding basics again like in most other C++ videos. Thanks!
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Yep, that's what I was going for - glad to hear it worked out!
@maggredon
@maggredon 4 ай бұрын
This video has been incredibly useful in putting some context behind C++ features. Thank you!
@ABCo-ABMedia
@ABCo-ABMedia 4 ай бұрын
You're welcome, glad you found it useful.
@bwtang
@bwtang 3 жыл бұрын
This is perfect for someone like me who's been primarily doing C# and gets confused with C++. Thank you so much! Very nice introduction to the language!
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Yep - that's exactly what it was intended for! To clarify all the confusing concepts when getting into C++ coming from C#. One of the nice things is all these concepts learnt in this video do actually apply to more advanced C# too! Especially the heap vs stack, that's very good to know. I'll actually be making a dedicated video about how memory is structured inside C# soon, and one of the things in it will be stack vs heap, which is in fact sort of already covered here, just from a C++ perspective, not a C# one!
@m1nnefr3d
@m1nnefr3d 11 ай бұрын
Having programmed C++ professionally in the late 1990s and now preparing for a new C++ project, I really enjoyed this recap. Highly recommended (and easily found when searching for »c++ for java programmers«) 👍 The only issue I had was with the distracting echo on the audio. Minor note: at 24:46, the call should read SecondMethod(&a) since a pointer to the MyClass instance needs to be passed.
@ABCo-ABMedia
@ABCo-ABMedia 11 ай бұрын
Yep, that was a mistake, a few other people have pointed it out in the comments! There *should be* a card in the top-right correcting it. I'm glad you like the content regardless! With regards to the echo, I know, it is really unfortunate and it was not intentional. Delay built into the mic, I didn't check it before recording, recording ruined
@hedlund
@hedlund Жыл бұрын
It's fucking rare the first result I watch is exactly what I wanted and more. Spectacular effort nicely packaged, thanks!
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
Nice!! Glad to hear it was everything you could have wanted :) I got more "advanced" videos like this coming soon!
@money_hyde
@money_hyde 4 ай бұрын
This is so freaking awesome! Finally this made sense to me. Seriously hope there are more videos on your channel like this. Thank you VERY much for the awesome video! :)
@ABCo-ABMedia
@ABCo-ABMedia 4 ай бұрын
Thanks! Glad you found it helpful!
@sonar9000
@sonar9000 3 жыл бұрын
this is the kind of video you always hope for but usually never find. Big thanks, it was excellent!
@blackcavalier9506
@blackcavalier9506 2 жыл бұрын
Thanks for a great video. Covers some important but behind the scenes concepts that most intro videos wouldn't.
@Noodle_Sushi
@Noodle_Sushi 2 жыл бұрын
This is a really great helpful video for a C# programmer myself. I was having trouble understanding about pointers and header files the last time I was learning C++, until I watched this video. I thought pointers were pointless before, because I didn't know passing an object to a method would make a copy of the said object in C++, since I was used to assuming that objects would be passed as references. I've heard about C++ programs about having memory leaks before, and the heap explanation helped me understand it. I'll be having my first year in Computer Science next month, and this video really helped me and gave me a head start. I rarely comment on KZbin videos, and I just want let you know how thankful I am for this video! ^^
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Glad it helped clarify some of those things! And yeah, pointers are certainly not pointless, they have "point" in their name after all ;)
@starcin
@starcin Жыл бұрын
This was the best C++ video I've ever seen.
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
Awesome, thanks! :)
@ary9344
@ary9344 2 жыл бұрын
What a gem, Thanks man, you explained it crystal clear!
@samad934
@samad934 4 ай бұрын
I am learning c++ and this video was really really helpful in explaining some of the key concepts I couldn't find any explanation for anywhere..... Thany you. Love your work.....
@ABCo-ABMedia
@ABCo-ABMedia 4 ай бұрын
You're welcome, glad you found it useful!
@academicalisthenics
@academicalisthenics 2 жыл бұрын
This was surprisingly helpful and well explained! Thanks!
@StuWilloughby
@StuWilloughby 4 жыл бұрын
Covered a lot of good stuff. Thanks.
@ABCo-ABMedia
@ABCo-ABMedia 4 жыл бұрын
Thanks a lot! Tell me if there are any other topics you want me to cover!
@TheCTMcG
@TheCTMcG Жыл бұрын
I've been stuck in PHP for years (after having started as a C++ programmer, years before that). This was awesome, thanks for your hard work!
@rezabagheri3088
@rezabagheri3088 2 жыл бұрын
Amazing! I have tried to learn C/C++ for a long time now and never managed to get a great understanding for how the stack, heap, pointers, etc... all function and come together. This video is so great because it relates everything together while showing what syntax does what so viewers will actually be able to see how their code works at a fundamental level. This is an amazing video and I will make sure to show it to anyone who wants to learn C or C++ (I know they are different languages in that they aren't both OOP and have some different syntax but the parts about pointers, the heap, and the stack should be conceptually similar).
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Glad you enjoyed!
@r6scrubs126
@r6scrubs126 2 жыл бұрын
man I wish I watched this a month ago. Answered pretty much every single problem I ran into coming from C#
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Shame you caught it now, then. But still, glad to hear you think it's got the right topics!
@arianb3669
@arianb3669 Жыл бұрын
Amazing video, I appreciate this so much. I'm starting college in about a month and I'm skipping straight to the second CS class because of AP credit I got during high school. the issue is that my high school classes all worked with java, while my college is gonna work with c++. so basically this is helping me a ton. Great job on this video and thanks so much
@YURI-OFFICIAL
@YURI-OFFICIAL 2 жыл бұрын
I've been developing with C# and such for quite a while now and I've never understood the use of pointers. But this video made so much sense of it in such a simple, short way! Great video👌
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
I'm glad to hear it!
@TroenderTass
@TroenderTass 3 жыл бұрын
Well, this is just perfect. Flawless presentation. Thank you very much.
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Glad you liked it!
@michor10
@michor10 Жыл бұрын
Excellent presentation. Thank you very much!
@mEEEEE1934
@mEEEEE1934 3 жыл бұрын
Super useful video, thanks a lot. I'll be subbing!
@rafaelcandeias511
@rafaelcandeias511 2 жыл бұрын
Thank you so much! You explained it crystal clear
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Glad to hear it!
@dragoneye2640
@dragoneye2640 3 жыл бұрын
An absolutely awesome video! Coming from Java, C#, and C, you have answered so many tedious questions that come up that are often overlooked or left to the person to figure out for themselves. Honestly, universities should pickup this style of teaching as it's the most effective 39 minutes and 46 seconds of my life.
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Thanks a lot! Are there any other topics you'd like me to make a video on?
@dragoneye2640
@dragoneye2640 3 жыл бұрын
@@ABCo-ABMedia I apologize for the late reply! I didn't receive a notification from KZbin and just saw this. Personally, I would love to see a video (or a series) that discusses various types of language compilers and/or interpreters for select languages. For example, LLVM and Clang for C and C++, Java AOT compilers, JIT vs AOT, and etc. Another potential topic could be automation through scripting. An example would be creating simple utility scripts on a particular OS to manage sorting of files given select parameters, a file-janitor that relocates the least used files in a particular directory to an "unused folder", periodic folder compression manager, and more.
@botballreads8235
@botballreads8235 4 жыл бұрын
You're really a GOAT for this video, my man. Thanks!
@ABCo-ABMedia
@ABCo-ABMedia 4 жыл бұрын
Haha alright, thanks! If you've got any topics (C/C++/C#) you would like me to cover, feel free to ask!
@karlbovski1656
@karlbovski1656 Жыл бұрын
This is gold. Thank you!
@Jack-ht3fr
@Jack-ht3fr 3 жыл бұрын
underrated video, you are awesome bro
@spyke8249
@spyke8249 2 жыл бұрын
Incredible video! Thank you! You explain very well, you just earned yourself a new subscriber! :)
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
I'm glad you liked it!
@gameblock9853
@gameblock9853 9 ай бұрын
This brilliant. It feels all intuitive.
@R2drum
@R2drum 3 жыл бұрын
I like the audio signal processing you used. And thank you for the excellent explanations in these subjects.
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
I'm glad you were able to find some enjoyment from the echo. I've pulled it back in all future videos however!
@mikaeledebro1144
@mikaeledebro1144 2 жыл бұрын
Just what I was looking for. Great presentation!
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Thanks! Glad you liked it.
@jboss1073
@jboss1073 10 ай бұрын
Subscribed within 5 minutes. Good stuff.
@wasd9049
@wasd9049 Жыл бұрын
Great Video. Thank you for sharing your knowledge. This helped me out a ton.
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
Happy to hear it!
@i123iu
@i123iu 2 жыл бұрын
This was soo helpful, thank you :)
@michagardea7253
@michagardea7253 3 жыл бұрын
Amazing summary, thank you for doing this video :)
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Thanks, glad you liked it!
@abhinayevani6976
@abhinayevani6976 Жыл бұрын
Highly appreciate this
@williamsworkshop8624
@williamsworkshop8624 3 жыл бұрын
Fantastic video. Coming from C# and this made the basics easy. I do suggest putting time stamps into the video though for quick reference.
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Thanks, and yeah I'll consider that. But part of the problem with doing that is a lot of the topics _depend_ on the topic from before so it makes people more prone to not understanding stuff.
@TON-vz3pe
@TON-vz3pe 2 жыл бұрын
This is the literally the best proof that the KZbin Algorithm is dumb and blamable. I got to see this video now!. I wonder where are those other jewels hidden because of the KZbin ineptitude. I never say this, but man your way of explanation is awesome and this video deserves more views and likes.
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Haha glad to hear you liked it. And yeah I mean, in all fairness to KZbin, I don't upload enough (yet!) to compete with the larger channels that focus more on quantity over quality. But I'll be picking this channel up soon and hopefully it'll start getting even more recommendations! I don't mind too much though, as long as it reaches enough people to make a difference I'm happy!
@TON-vz3pe
@TON-vz3pe 2 жыл бұрын
@@ABCo-ABMedia Cool.
@adreiiaii510
@adreiiaii510 3 жыл бұрын
I took C in college... Never touched C++. I struggled a bit to understand it, but was also completely new to programming. Years later I taught myself C# and ended up finding C++ too intimidating. This video is incredibly well done.. as all the elements of C++ I couldn't understand.. are explained beautifully here. It also shows me, as someone who wrote a fair bit of complex C code (obnoxious data structures exams/projects), how C++ (probably) grew over time. The 'malloc -> new' bit as one example. Super interesting and now youve got me considering picking up C++ :p
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
I'm glad to hear you found the video helpful and it inspired you to play with C++! Picking up C++ is definitely a nice way to expand your knowledge out further. And in fact, when I got into it ages ago, it didn't just make me better at C++, it made me better at C# too, because as I learnt about the stack vs heap and about fully using pointers etc. It all started to fill in many of the gaps I had in my knowledge about how memory is actually structured in C# too. Like the difference between class and struct. And it's what allowed me to then really get into the .NET internals, to the point where I can now safely say I know a lot now about the .NET internals and what's going on inside, and I'm definitely going to be making videos in the future about exactly that at some point! So stick around if you're interested in digging into what's going on inside C# and .NET, and such because videos about it will be coming at some point. In the meantime though, the current thing going on in the channel is the "PowerShell" video series, PowerShell is something I think is really interesting because it's literally C# in a command line form, it's built on .NET and commands give back .NET classes and such. By the way: If there's anything you'd specifically like to hear about the internals of, let me know and I'll happily prioritize it when the channel gets around to .NET internals
@rorymax
@rorymax 3 жыл бұрын
I was looking for someone else’s video but ended up watching the whole thing. Awesome
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Cool! Thanks for sticking with the video.
@guysudai4843
@guysudai4843 2 жыл бұрын
That was on point! Thanks!
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Glad you liked it!
@georgesaeid7231
@georgesaeid7231 Жыл бұрын
This is so great. Thank you very much 💓++
@HappyFeetSalsa
@HappyFeetSalsa 2 жыл бұрын
Wondering if it's worth the time? IT IS! Wonderful job sir. Thank you.
@leonardkupper5057
@leonardkupper5057 3 жыл бұрын
Great video, imo it had the optimal length and covered all important topics. Maybe you could‘ve mentioned smart pointers when talking about memory allocation and freeing, as these are such an important tool in memory management.
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Thanks for the feedback! I wanted to keep this video to just the basic differences and didn't want to pack too much content into it. If you search for videos about plain pointers, then almost all of them are targetted at beginners, and the explanations are slow and in-depth like that, and I wanted to avoid that for people who already know C# with this video. However, there is a lot more content on _smart_ _pointers_ and such for developers who are already experienced, so I felt like putting more advanced things like that in here wasn't necessary when there's already lots of correctly levelled content. I might make some more videos on C++ in the future, however, so if there are any topics you do want me to cover, then be sure to let me know!
@chadmwest
@chadmwest Жыл бұрын
This is excellent. Thanks!
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
You're welcome
@julinaut
@julinaut 2 жыл бұрын
When I first looked at C++ there were a lot of things confusing me but now it all makes so much sense, this is a very good summary. I will ofc have to do further learning but this video is a great start for anyone coming from C#
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
The same thing happened to me too when I first looked at C++, and I felt there just weren't any good resources that just simply _explained_ these core concepts for an already existing C# developer well, and that's why I made this video!
@rdawson3648
@rdawson3648 2 жыл бұрын
Can add that anyone coming from an interpreted language would benefit! Your video makes it clear what top-down implies in the structure of C++ verses an interpreted language.
@RishiKumar-xw5nd
@RishiKumar-xw5nd 3 жыл бұрын
This is amazingly good and on point.
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
I'm glad you like it!
@johanolsson7180
@johanolsson7180 Жыл бұрын
Damn, very good video! 2 times speed with some knowledge of c++ before and it was perfect! Worth noted I have programming experience and data/hardware experience as well.
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
Glad to hear it!
@jonatan9142
@jonatan9142 2 жыл бұрын
really good vid coming from JavaScript / C#, I was able to watch at 1.5x speed and still follow.
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Happy to hear it!
@TornTech1
@TornTech1 3 жыл бұрын
Really Useful Video! i feel quite confortable in C#, but am keen to add C++ to my skillset for some personal projects, this helped lots! Follow up video would be good with other tips and tricks!
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Glad it was helpful. There isn't absolutely loads else to cover in a follow-up video, except templates. I'd recommend taking a look at "The Cherno" to learn more about C++, those videos are really good!
@arkantos14821
@arkantos14821 Жыл бұрын
it was very helpful, thanks alot
@markusmulholland
@markusmulholland 3 жыл бұрын
Brilliant, thank you.
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Thank _you_ for watching!
@jhein01
@jhein01 4 жыл бұрын
Very well done video, thanks
@ABCo-ABMedia
@ABCo-ABMedia 4 жыл бұрын
Glad you liked it! Be sure to tell me if there are any other topics you want me to cover! :)
@nati7728
@nati7728 2 ай бұрын
Thank you!
@jeanpierre5444
@jeanpierre5444 2 жыл бұрын
very useful thank you
@ouimerci7112
@ouimerci7112 2 жыл бұрын
Great video, thanks !
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Thanks!
@solomonpierce2676
@solomonpierce2676 3 жыл бұрын
Great video, thank you!
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Thanks, happy to hear it.
@puppx13
@puppx13 Жыл бұрын
This was good stuff .
@oczi1660
@oczi1660 2 жыл бұрын
The video is really impressive! also the echo makes you sound like a god lol
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Yeah the echo is the #1 problem I have with this video, glad you were able to look past it
@BestKosmakCZ
@BestKosmakCZ 4 жыл бұрын
This video is actually fucking cool man. Love it!
@ABCo-ABMedia
@ABCo-ABMedia 4 жыл бұрын
Glad you like it! Sorry for the late reply, KZbin didn't show this comment for a while haha. If there are any topics you also want me to look at, then please tell me!
@SketchEtcher
@SketchEtcher 2 жыл бұрын
So concise, love it! Question: at ~14:40 shouldn’t the call to SecondMethod be changed to “SecondMethod(&a)” so that the address of MyClass is sent as the parameter-or since the parameter specifies that it requires a pointer, can it grab the pointer automatically?
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Assuming you mean "MyMethod(&a)`, you'll notice I do make that change after a second, I just don't comment on it!
@ionthedev
@ionthedev Жыл бұрын
wow what a nerd. This video is actually golden! Thank you very much.
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
Uh, thanks? lol
@frenchreefer
@frenchreefer 3 ай бұрын
Excellent video thank you. At 24:46 when you modify the method to take a MyClass pointer, I think the SecondMethod invocation in main() needs to adapted to now pass the pointer to a as in `SecondMethod(&a)`.
@ABCo-ABMedia
@ABCo-ABMedia 3 ай бұрын
Yep, that's a mistake in the video.
@bipinmaharjan4090
@bipinmaharjan4090 3 жыл бұрын
Thank man.
@ForgetYourMix
@ForgetYourMix Жыл бұрын
Great video, one of the better videos for developers learning C++. I have a question though. What is the practical application for not using a pointer in a method signature? Like why would you not want to pass the pointer?
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
Well some types like "int" are so small that there's no point in passing them as a pointer, and you're actually just adding extra work for the CPU by doing it. And sometimes you might have types that are only 8-16 bytes, same situation. It's not too common to not pass a pointer but it definitely _can happen_ - it's why C# and Java opted for leaving which is used up to the _type_ itself and having most types being reference types (i.e. passed by a pointer)
@5ub7even
@5ub7even 3 жыл бұрын
The fake echo is rather offputting but other than that, this was an amazing video to watch. You've covered a lot of topics in this video!
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Thanks a lot! I know, it is a really big shame about the echo, it wasn't intentional. It was a problem with my gear, but I fixed it for all of my other videos.
@azgan123
@azgan123 Жыл бұрын
watching 7 minutes already breaking out laughing. c++ is great!
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
Huh, interesting reaction, what's the funny part? :P
@azgan123
@azgan123 Жыл бұрын
@@ABCo-ABMedia Most of it. Particularly the part where you need separate header files or how you can't pass object around but have to deal with the pointer bullshit. Just lmao. I'm going to use matlab to generate my cpp scripts I guess. 🤣🤣🤣
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
@@azgan123 Yeah the header files suck quite a bit, although it makes sense why they're necessary in terms of linkers, I think it could have *definitely* been designed a lot better. But regarding the pointers, that's just how the CPU works! When you pass an object in C#, if that object is a "reference type" (like most things in C# are), it's passing a pointer, and at least in C++ you have control over whether it does that or not, whereas in C# you're forced to it always passing by reference. C++ is very good at exposing the behaviour of the machine which can be really useful for performance, which is C++'s main focus nowadays. That being said, a lot of the performance things you can do in C++ you can do in C#, as C# has value types if you want that more fine-grained control over where things are in memory, it has optional pointers and many Unsafe APIs, it lets you allocate arrays to the stack using "stackalloc" and various other things that let you achieve almost anything you want to achieve in C++ in C#. So I personally prefer C# greatly as it lets you get very close performance to C++ if you need it.
@RoadRoller01
@RoadRoller01 3 жыл бұрын
very nice video, thanks
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Happy to hear it :)
@neochen172
@neochen172 3 жыл бұрын
amazing!
@Xwxwxx
@Xwxwxx 4 жыл бұрын
Nice and clear explanation, like
@ABCo-ABMedia
@ABCo-ABMedia 4 жыл бұрын
Thanks a lot! Really appreciate it - please tell me if there are any other topics you would like me to cover in the future! :)
@Xwxwxx
@Xwxwxx 4 жыл бұрын
@@ABCo-ABMedia Memory management in c++
@ABCo-ABMedia
@ABCo-ABMedia 4 жыл бұрын
​@@Xwxwxx What in particular about memory management in C++?
@frosky9497
@frosky9497 7 ай бұрын
How did you manage to get a yellow rectangle around the line you are debugging? in current version of Visual Studio 2022 this only exists in c# In c++ there is only an arrow a rectangle does not appear.
@ABCo-ABMedia
@ABCo-ABMedia 7 ай бұрын
Well... Given this video was made in 2020, I obviously wasn't using VS 2022 - I guess VS 2019 had it and they got rid of it (probably found it had some inaccuracies in some multi-line edge cases or something and decided it was best to get rid of it to avoid confusion)
@mustafabektas7207
@mustafabektas7207 3 жыл бұрын
Excellent video! Just wanted to correct a small mistake at 25:15 Mark. It should be secondMethod(&a). Let me know if I am mistaken. Thanks again for the great video!
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Yeah, you're right. That was a mistake! Glad you still found the video helpful.
@mustafabektas7207
@mustafabektas7207 3 жыл бұрын
@@ABCo-ABMedia Definitely dude. The fact that I was able to notice and correct the mistake shows that your video is both very good at teaching the stuff and keeping the viewer engaged. Kudos for the stack visualization part, made it much more clear for me than ever before. Good luck.
@WarlordMSM
@WarlordMSM Жыл бұрын
Can someone explain why in 15:00 there is a `&` to pass the address of the class but it is not like this in 25:00 ?
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
It's... Actually a mistake! I know, it sucks, it's awesome that you spotted it though!
@qwertyls8552
@qwertyls8552 4 жыл бұрын
Amazing. To be honest I almost closed video when i heard boyish voice. But I glad now that I didn't. It's just amazing
@ABCo-ABMedia
@ABCo-ABMedia 4 жыл бұрын
Wow, uh, thanks? Not sure what to do about the "boyish voice"! :) Glad it was helpful though PS: If you had a problem with the echo, that's sorted out.
@qwertyls8552
@qwertyls8552 4 жыл бұрын
@@ABCo-ABMedia Sorry for that remark. Can you make a video "java for c# developers" ? There isn't that much to cover, but it would be great to have such video, because i really couldn't find one on youtube...
@ABCo-ABMedia
@ABCo-ABMedia 4 жыл бұрын
@@qwertyls8552 Sure! I'll get to work on that as soon as I can! As for the remark, it's fine, I am pretty young lol
@Parker8752
@Parker8752 2 жыл бұрын
It's worth remembering that arrays in C/C++ are literally just syntactic sugar for pointers - you can (though you probably shouldn't) put negative numbers into your square brackets to look at earlier entries in memory. If you're passing around an array, it's generally a good idea to pass the size of the array as well. This is why if you want to handle command line arguments, main needs to take a char** (basically an array of char arrays) as well as an int which lists how many char arrays are in the main array (usually named argv and argc respectively). There is no runtime bounds checking unless you add it. A C++ vector, on the other hand, while it doesn't have built in bounds checking, does at least store its own size, as well as having a number of useful methods. In most situations in C++, you should probably use a vector rather than an array, and a C++ string over a char array.
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
I... Already said that arrays are just pointers? And I already mentioned std:: vector... And std::string... So, what exactly are you getting at here that's new? :P
@Parker8752
@Parker8752 2 жыл бұрын
@@ABCo-ABMedia I just wanted to expand on that - the lack of built in bounds checking is a common cause of security issues in C++ code. Also, it means that in code where you don't necessarily know the length of the array (if you're writing a library, for instance), you need to have both the array and its length as separate parameters to a function (or members of a class) because there's no built in way to get that information.
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
@@Parker8752 Fair enough
@yipyip454
@yipyip454 2 жыл бұрын
awesome guy ....
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Uh, thanks!
@colehdlr
@colehdlr Жыл бұрын
very very good video
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
Thanks!
@carstenrasmussen1159
@carstenrasmussen1159 2 жыл бұрын
I have worked with C++ for years but 10years ago or so I started doing D. I would say that it would be easier to go to D than C++ and it is compatible with C and C++. D or the subset of D (BetterC) is as fast C and C++ buts it is just much easier to read and maintain.
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Fair enough! There are tons of languages that you could argue are better than C++, C++ is definitely a very flawed language! Still from an understanding perspective I think it's incredibly useful to know about, it definitely gives you a very unique perspective!
@HiImKyle
@HiImKyle Жыл бұрын
I don't understand the echo you have but this is great stuff
@samuvisser
@samuvisser 2 жыл бұрын
Im a lazy Java programmer with a C++ exam due in 2 hours which i learned nothing for (its all quite basic). We’ll see in a couple hours, but im pretty sure u just saved my exam lol. Some of these i would never have just guessed
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Oh wow well, I... Hope it goes well! This wasn't really designed for an _exam_ in mind so the pressure is on there! lol
@jmcdowall
@jmcdowall 2 жыл бұрын
Me: what is see and and? *40 minutes later* Me: I am now a C++ dev.
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Haha well, glad to hear it made you feel that way! :P
@josefdepp5799
@josefdepp5799 Жыл бұрын
I understand all pictures loud and clear. But what language you are speaking?
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
Hi! I think there's kind of two aspects to what you just said, and I'll try my best to respond to both of them. In this video, there is a really, _really_ annoying echo - it's unprofessional, you have to get used to it at first, it turns people off the video when they first click on it, it _pains me_ knowing it's there, I really wish it wasn't... But there was nothing I could do once I recorded. I fixed the issue for future videos but the damage to this one was already done, so I just went on with it. You get used to it really quickly, but I agree, it _sucks_ - it pains me more than it pains anyone else, I can tell you that. That aspect... Yeah, I take 100% blame for. Of course, I know that's not what you were talking about, you were talking about my pronunciation of words and my voice. Now look, I won't try and argue I have a particularly good speaking voice, or that I used to pronounce "s"es right, or that 2 years ago isn't representative now. But even if you were struggling to follow along, which if you saw all the visuals you can't have been, the good news is my videos all have subtitles on them! Turn 'em on, hell, mute the sound if you really insist, and enjoy! I do, and always have done, everything I reasonably can to try and offer the best experience, so if it makes you more comfortable, I encourage you to use that instead. I'm happy that you enjoyed the visuals, and I hope the video helped you out in some way. I do appreciate the feedback, although you didn't mean it the way I'm treating it, but I assume the best. Best wishes, Alex
@clocked2002
@clocked2002 Жыл бұрын
please do a tutorial on assembly language and the stack!
@ABCo-ABMedia
@ABCo-ABMedia Жыл бұрын
If I can ever get around to it, I would definitely love to!
@clocked2002
@clocked2002 Жыл бұрын
@@ABCo-ABMedia this was very useful regardless, appreciate it!
@zebybez
@zebybez 3 жыл бұрын
good video
@xdeath3637
@xdeath3637 3 жыл бұрын
I am not on this level yet but I would look at it again in 2 months.
@ABCo-ABMedia
@ABCo-ABMedia 3 жыл бұрын
Yeah, you do need to actually know C# quite well before watching this video. Take as much time as you want, there's no rush.
@King_Ithra
@King_Ithra 2 жыл бұрын
Is there a way to remove the annoying echo from this video?
@ABCo-ABMedia
@ABCo-ABMedia 2 жыл бұрын
Sadly no, there is nothing I can do about it. Believe me if there was, I would have. This is the only video where I have this problem and I fixed it for every future video. All I can say is you get used to it pretty quickly after a few minutes
Java for C# Developers
25:32
ABMedia
Рет қаралды 17 М.
Faster than Rust and C++: the PERFECT hash table
33:52
strager
Рет қаралды 517 М.
WHO DO I LOVE MOST?
00:22
dednahype
Рет қаралды 60 МЛН
New Gadgets! Bycycle 4.0 🚲 #shorts
00:14
BongBee Family
Рет қаралды 19 МЛН
1❤️#thankyou #shorts
00:21
あみか部
Рет қаралды 88 МЛН
Forbidden C++
33:07
javidx9
Рет қаралды 1 МЛН
Master Pointers in C:  10X Your C Coding!
14:12
Dave's Garage
Рет қаралды 281 М.
Java vs C# (C Sharp). Что выбрать?
14:40
Sergey Nemchinskiy
Рет қаралды 239 М.
Should you learn C++?? | Prime Reacts
20:29
ThePrimeTime
Рет қаралды 318 М.
Learn PowerShell: Episode 1, The Basics
26:43
ABMedia
Рет қаралды 89 М.
Advanced C: The UB and optimizations that trick good programmers.
1:12:34
Eskil Steenberg
Рет қаралды 157 М.
Cross Platform Graphical User Interfaces in C++
44:49
javidx9
Рет қаралды 858 М.
LEARNING C++ with Java/C#/Python Experience // Code Review
47:46
The Cherno
Рет қаралды 145 М.
Can AI code Flappy Bird? Watch ChatGPT try
7:26
candlesan
Рет қаралды 9 МЛН
Купил этот ваш VR.
37:21
Ремонтяш
Рет қаралды 263 М.
📦Он вам не медведь! Обзор FlyingBear S1
18:26
Samsung Galaxy 🔥 #shorts  #trending #youtubeshorts  #shortvideo ujjawal4u
0:10
Ujjawal4u. 120k Views . 4 hours ago
Рет қаралды 1,9 МЛН
Main filter..
0:15
CikoYt
Рет қаралды 7 МЛН
Mi primera placa con dios
0:12
Eyal mewing
Рет қаралды 719 М.
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 23 МЛН
Мечта Каждого Геймера
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,6 МЛН