🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/ Experience the power of practical learning, gain career-ready skills, and start building real applications! This is a step-by-step course designed to take you from beginner to expert in no time!💰Use this coupon to save 10% (CODEBEAUTY_YT10). Use it quickly, because it will be available for a limited time. 📚 Learn programming with these Free E-Books ⬇ C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook *****CODE FROM THE VIDEO***** #include using namespace std; class Movie { public: string Name; string Genre; float Rating; Movie(string name, string genre, float rating) { Name = name; Genre = genre; Rating = rating; } Movie() { Name = ""; Genre = ""; Rating = 0; } Movie(const Movie& original) { Name = original.Name; Genre = original.Genre; Rating = original.Rating; } Movie& operator=(const Movie& original) { Name = original.Name; Genre = original.Genre; Rating = original.Rating;
return *this; } }; int main() { Movie movie1("The Dark Knight", "Action", 9.5); Movie movie2("The Lion King", "Animated", 8); Movie movie3; Movie movie4(movie1); movie4 = movie2; //movie4.operator=(movie2); Movie movie5 = movie1; movie5 = movie2; cin.get(); }
I've been waiting patiently for more coding videos in C++ and it looks like my patience is paying off because lookie here! A new C++ coding video🤗!! Thank You very much Saldina✌️!!
These technical differences particularly how the memory is allocated and deallocated at the backend you taught through excel they are highly commendable. Dynamic allocation is the tough part for beginners but you explained really well the topic that is hard to find on youtube
CodeBeauty, your explanation using google sheet is absolutely great.. I tried to catch you multiple times (Assuming you will miss explaining something) and you proved me wrong every time tried :)
Great teacher, thank you so much, you have an easy explanation way i understand all what you say, much love for you Saldina, i hope i have enough money to pay for your course
You are so welcome, and I hope that you'll join us in the course. You'll learn how to build real apps and get experience so that you can start a successful career as a developer 😊🥰
i think most important difference between according to me assignment operator and copy constructor is that assignment operator copies all the values from the object given to the new object made as it is ( we have no control) in copy constructor we can customize the behavior when copying an object... and also if the member variable is a pointer it can lead to problems if two variables are pointing to same type which can happen in case of assignment as no control
@CodeBeauty The assigment operator returns a reference to the Movie other then an address of Movie. How do you think about that? See 13:25, for detail. If I am wrong, please let me know.
I have a few more videos about constructors, destructor, copy c-tor on my channel. They should be in C++ OOP playlist, I hope they help to explain more stuff 😄😄👋
26:53 you imagine that the array contains 2 variables so that the explanation could fit better. However, so far in the lecture/code, the counter is set to 0 and the array is empty.
I Like The Way You Insist On Details I'd Like To See The Process Of Writing an object with A String Field In a Binary File : Save Method Good Continuation... ♥
I have a question when you delete the array of Pointers in the assignment operator and make a new srting dinamic array why the adress changes in Exel explanition althout u don't make Actors= nullptr?
Hi, Sabina, you should probably add "Orthodox Canonical Style" to the video title:) trust me, a lot of people will look for it as soon as it explained quite poor in UA-cam
You'll probably not create copy c-tors and assignment operators every day, but you'll definitely use them daily in your work, so if you for example get a bug and you don't understand this in depth, you'll have no idea how to fix the bug and make your code work
i'm honestly in awe how we get these videos for free 😭. i'm really slow at understanding programming concepts so i turn to youtube videos to help break it down for me. out of everyone i've watched, your videos explain concepts to beginners the best and are super easy to follow along. i feel 10x more confident in my programming knowledge after just watching a couple of your videos. thank you so much for the work that you do! i wish you nothing but the best
wow, thank you for kind words. if you like my content that much, I highly suggest that you check my Practical Programming Course at www.codebeautyacademy.com We are building real C# (not C++) application and you will be learning alongside other students, with me as your personal tutor. With this you will also gain access to exclusive Discord community. I'll be happy to have you there. :)
They are related concepts, but they don't represent the sam thing. Watch my video about structures, and you'll learn what structures are with examples 😊
newActor is just holding the address in memory, and in that memory, we have data that we need, so if we free that memory, we'll lose the data that we need
@@CodeBeauty I really don't know English, I'm answering you with google translate. This science of programming attracts me so much that I want to practice it and learn it perfectly. But I don't know, this also prevents me from learning after you. 😥
While an assignment-copy is a "Deep Copy", moving is a "Shallow Copy". Shallow copy steals pointers rather than duplicate their contents. here you go: struct Movie { std::string title; int year;
🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/
Experience the power of practical learning, gain career-ready skills, and start building real applications! This is a step-by-step course designed to take you from beginner to expert in no time!💰Use this coupon to save 10% (CODEBEAUTY_YT10).
Use it quickly, because it will be available for a limited time.
📚 Learn programming with these Free E-Books ⬇
C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book
Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook
*****CODE FROM THE VIDEO*****
#include
using namespace std;
class Movie {
public:
string Name;
string Genre;
float Rating;
Movie(string name, string genre, float rating) {
Name = name;
Genre = genre;
Rating = rating;
}
Movie()
{
Name = "";
Genre = "";
Rating = 0;
}
Movie(const Movie& original) {
Name = original.Name;
Genre = original.Genre;
Rating = original.Rating;
}
Movie& operator=(const Movie& original) {
Name = original.Name;
Genre = original.Genre;
Rating = original.Rating;
return *this;
}
};
int main()
{
Movie movie1("The Dark Knight", "Action", 9.5);
Movie movie2("The Lion King", "Animated", 8);
Movie movie3;
Movie movie4(movie1);
movie4 = movie2;
//movie4.operator=(movie2);
Movie movie5 = movie1;
movie5 = movie2;
cin.get();
}
the best ever , now I can say Understand difference between copy constructor and assignment operator is completed, thanks alot.
I've been waiting patiently for more coding videos in C++ and it looks like my patience is paying off because lookie here! A new C++ coding video🤗!! Thank You very much Saldina✌️!!
Hahaha, I'm happy to hear that. Welcome back to another C++ lesson 🥰❤️
Thank You; really extraordinary clear and easy explanation !
These technical differences particularly how the memory is allocated and deallocated at the backend you taught through excel they are highly commendable. Dynamic allocation is the tough part for beginners but you explained really well the topic that is hard to find on youtube
Very good tutorial! Thank you.
CodeBeauty, your explanation using google sheet is absolutely great.. I tried to catch you multiple times (Assuming you will miss explaining something) and you proved me wrong every time tried :)
amazing explanation in constructors watchin all of them, thanks a lot!
Glad you like them!
it was very good
please publish more videos on OOP
Great teacher, thank you so much, you have an easy explanation way i understand all what you say, much love for you Saldina, i hope i have enough money to pay for your course
You are so welcome, and I hope that you'll join us in the course. You'll learn how to build real apps and get experience so that you can start a successful career as a developer 😊🥰
I hope that too, but one day I will join I'm sure @@CodeBeauty ❤❤
Nice lesson! You look great today.
Thanks 😃
I am very excited for this video🥰I like your C++ programming tutorials, it helps me very much💝
Happy to hear that! The video is out, hope you'll enjoy it 🥰
i think most important difference between according to me assignment operator and copy constructor is that assignment operator copies all the values from the object given to the new object made as it is ( we have no control) in copy constructor we can customize the behavior when copying an object... and also if the member variable is a pointer it can lead to problems if two variables are pointing to same type which can happen in case of assignment as no control
Hi Iike your teaching method, the way you explained the difference between copy constructor and assingment costructor is very interesting
Thanks, SN
Shallow Copy and Deep Copy
Rule of 3 (and the lesser known Law of the Big Two)
@CodeBeauty The assigment operator returns a reference to the Movie other then an address of Movie. How do you think about that? See 13:25, for detail. If I am wrong, please let me know.
It would make sense to also cover move constructor, move assignment operator, to be complete.
I have a few more videos about constructors, destructor, copy c-tor on my channel. They should be in C++ OOP playlist, I hope they help to explain more stuff 😄😄👋
Thank you so much!!
Hi can you make a video in that serie that talks about move constructor?
Cool! Thank-you.
You're welcome!
26:53 you imagine that the array contains 2 variables so that the explanation could fit better. However, so far in the lecture/code, the counter is set to 0 and the array is empty.
OMG!! You're AMAZING thank u! ❤
Are we going to build gui apps as well plsss!
We are waiting
The video is out now 😊🥰
I Like The Way You Insist On Details I'd Like To See The Process Of Writing an object with A String Field In a Binary File : Save Method
Good Continuation... ♥
I do not understand why initializer list has been omitted for the demonstrated constructors. 😢
I can not put everything in one video. It's already very long 😅😅
thank you so much
Thank you Saldina....vedio is graat and Your gorgeous.
My pleasure 😊
Gooooood😊
This is some high level content with low level programming!
yess I know C++ is a high level programming language ok
I have a question
when you delete the array of Pointers in the assignment operator and make a new srting dinamic array
why the adress changes in Exel explanition althout u don't make
Actors= nullptr?
Thanks.
You're welcome
We are waiting, and happy that the content picture does not include sub-messages. 😂
The video is out. I hope you'll enjoy it 🥰
Hi, Sabina, you should probably add "Orthodox Canonical Style" to the video title:) trust me, a lot of people will look for it as soon as it explained quite poor in UA-cam
do you use either of these in your day job?
You'll probably not create copy c-tors and assignment operators every day, but you'll definitely use them daily in your work, so if you for example get a bug and you don't understand this in depth, you'll have no idea how to fix the bug and make your code work
copy constructor as movie class name is written before obj this means its a completely new obj being allocated memory
i'm honestly in awe how we get these videos for free 😭. i'm really slow at understanding programming concepts so i turn to youtube videos to help break it down for me. out of everyone i've watched, your videos explain concepts to beginners the best and are super easy to follow along. i feel 10x more confident in my programming knowledge after just watching a couple of your videos. thank you so much for the work that you do! i wish you nothing but the best
wow, thank you for kind words. if you like my content that much, I highly suggest that you check my Practical Programming Course at www.codebeautyacademy.com
We are building real C# (not C++) application and you will be learning alongside other students, with me as your personal tutor. With this you will also gain access to exclusive Discord community.
I'll be happy to have you there. :)
@@CodeBeauty i unfortunately don't have the funds right now to be able to sign up, but go get that bag, girl!
What is difference between constructors and structures
They are related concepts, but they don't represent the sam thing. Watch my video about structures, and you'll learn what structures are with examples 😊
Why not deleting the newActor to free up the memory?
newActor is just holding the address in memory, and in that memory, we have data that we need, so if we free that memory, we'll lose the data that we need
I'm here for clickbait. Nice hat!
They say comments help the "algorithym". Done.
Redundantly. :)
Hahah, they do, thanks for the comment 😄 🥰
line 45 copyconstructor will be called, line 46 assignment operator fn
👍
👋
She is my lovely cat sweet girl ! only mine !!!!!!!! Please do more videos !!!!!!!! 😘😘😘😘😘😘😘😘😘😘😘😘😘 I LOVE YOU KISS KISS KISS KISS KISS LOOOOOOOOOOVE .
🥰🥰
@@CodeBeauty 😘😘😘😘😘
Ur accent is damn cute 🥺
It's the first time someone says that to me. Thank you so much 🥰🥰
Dont speaks English not understand english. My favorite programming language of computers 😢😢😢
Your English is not bad 😊😊
@@CodeBeauty I really don't know English, I'm answering you with google translate. This science of programming attracts me so much that I want to practice it and learn it perfectly. But I don't know, this also prevents me from learning after you. 😥
@@artstechnology7809Try to see if chatGPT can help you as well. It can explain code blocks line by line and translates quite well to other languages!
While an assignment-copy is a "Deep Copy", moving is a "Shallow Copy". Shallow copy steals pointers rather than duplicate their contents. here you go:
struct Movie {
std::string title;
int year;
Movie() {
std::cout
I great video to a greater teacher 🤍
Thank you! 😃