Two weeks ago I was watching another channel for learning C++, the other channel was good, but THIS CHANNEL IS WAYS BETTER. Very well explained, thank you so much.
@PortfolioCourses2 жыл бұрын
Thank you for being so supportive Eduardo, I'm glad you've found the C++ videos on this channel to be helpful. :-)
@WeirdGoatАй бұрын
Oh Man, you're so great at teaching! No nonsense at all, just directly goes into the knowledge we need!
@otheusma Жыл бұрын
everytime i dont fully understand some new concept, i come to this channel and everything starts to make sense!
@PortfolioCourses Жыл бұрын
That's awesome Matheus, that makes me very happy to hear that the channel is helpful for you, thanks so much for sharing this! :-)
@punchline17292 жыл бұрын
I subed The pace and tone of these tutorials are pretty good, the information penetrates my brain when I watch them
@PortfolioCourses2 жыл бұрын
That’s awesome to hear, and welcome aboard! :-)
@ValliNayagamChokkalingam Жыл бұрын
Thanks a ton! Your students are lucky to have an amazing professor like you!
@PortfolioCourses Жыл бұрын
You're welcome Valli-Nayagam, and thank you for the kind words! :-)
@dashdroptv2 жыл бұрын
Very thorough explanation with great examples. Thanks for clarifying!
@PortfolioCourses2 жыл бұрын
You're welcome, I'm glad it was helpful! :-D
@dwivedys7 ай бұрын
Deep copy and Shallow copy concept sorted! Thank you!
@amrrasslan43293 ай бұрын
every time i want to revise this topic i end up here thank you so much
@papertowers42162 жыл бұрын
This was extremely helpful and clear thank you so much.
@PortfolioCourses2 жыл бұрын
You're welcome! :-)
@semihaturkoglu5 ай бұрын
don't be bored telling the same thing: you're the best instructor
@Anonymous-bu5bg Жыл бұрын
Excellent explanation!!
@PortfolioCourses Жыл бұрын
I'm glad you enjoyed it! :-)
@Anonymous-bu5bg Жыл бұрын
@@PortfolioCourses do you have whole video like this on oops?
@PortfolioCourses Жыл бұрын
No, right now I just have videos in the C++ Tutorial playlist covering lots of different OOP concepts. One day I would like to make a whole video covering OOP in C++ that is more of a "full course".
@austinyu74042 жыл бұрын
I love u holy moly i was realy scratching my head on copy constructors
@PortfolioCourses2 жыл бұрын
I'm glad to hear this video helped you out Austin! :-)
@KaLaka162 жыл бұрын
Thanks a lot, this helped me solve a programming exercise i was stuck at.
@PortfolioCourses2 жыл бұрын
You’re very welcome! :-)
@jixuancheng Жыл бұрын
@2:17 num2=num1; is using copy assignment operator function, instead copy construct. num2(num1) is using copy construct in my knowledge. That’s very confusing. But concept must be right.
@sallaklamhayyen98762 жыл бұрын
great explanation, thank you
@PortfolioCourses2 жыл бұрын
You’re welcome! :-)
@keblinskiwastaken Жыл бұрын
I did not receive any errors when the exit() was removed. Should I be worried if I dont receive errors or is it just depending on the software? I use vscode.
@drankkkkkk2 жыл бұрын
Excellent video!
@PortfolioCourses2 жыл бұрын
I’m glad you enjoyed it, and thank you very much! :-)
@emfahmi182 жыл бұрын
This is so helpful, thank you so much
@PortfolioCourses2 жыл бұрын
You're welcome! 🙂 Thank you for letting me know it was helpful for you.
@isaackanda8162 жыл бұрын
thanks very much brother man🙌
@PortfolioCourses2 жыл бұрын
You're welcome Isaac! 😀
@kevinliao99382 жыл бұрын
Really helpful Thanks
@PortfolioCourses2 жыл бұрын
You're welcome Kevin! 🙂
@ibrahimmalik4590 Жыл бұрын
instead of malloc statement can we use new keyword?
@PortfolioCourses Жыл бұрын
Yes Ibrahim. :-) I used malloc() in this video thinking that many programmers would be coming from C and may be more familiar with it, but a "C++ way" of doing it would be to use new instead.
@shafayet01982 жыл бұрын
why is const have been used in "Number(const Number &otherNumber)"
@PortfolioCourses2 жыл бұрын
Great question Akash! :-) Because we will not modify otherNumber, we just use it to make the copy. It would be a mistake if we did. So we help enforce this with the language feature const.
@makaty9883 Жыл бұрын
thx alot!
@itsmaxim01 Жыл бұрын
I get why you’re using malloc and free in this case (ie to throw the error) but really you should mention this is not considered good practice (and mention new/delete/smart pointers)
@abdellahguennioui1568 Жыл бұрын
hello, first i would to thank you for this tutorial, i do exactly the same thing in my computer but the deep copy he dosen't work, can you help me?
@PortfolioCourses Жыл бұрын
You're welcome Abdellah! :-) The code in this video is found here, does using this exact code help resolve the issue? github.com/portfoliocourses/cplusplus-example-code/blob/main/copy_constructor.cpp
@abdellahguennioui1568 Жыл бұрын
@@PortfolioCourses thank you so much for your videos, it's very helpful, i searched on internet and it's working now, thank you.
@PortfolioCourses Жыл бұрын
@@abdellahguennioui1568 Awesome I'm glad to hear you got it working, and you're welcome Abdellah! 🙂
@Vichained2 жыл бұрын
whts the diff between new and malloc?
@PortfolioCourses2 жыл бұрын
One day I'm going to make a video on dynamic memory allocation in C++. :-) The big difference is whether the constructor/destructor is called or not though, this might be helpful in the meantime: www.geeksforgeeks.org/new-vs-malloc-and-free-vs-delete-in-c/
@Vichained2 жыл бұрын
@@PortfolioCourses i know what dynamic memory allocation is. What you mean is that when you use New keyword you have to use the delete in order to free the allocated memory, while in alloc it’s done automatically?
@PortfolioCourses2 жыл бұрын
@@Vichained No, with malloc and calloc you need to free the memory that's been allocated, it's not automatic. With new and delete, the constructor and destructor of any object will be executed, with malloc/calloc/free, the destructor and constructor will not be executed.