Copy Constructor in C++ | C++ Tutorial | Mr. Kishore

  Рет қаралды 156,769

Naresh i Technologies

Naresh i Technologies

Күн бұрын

C ++ Tutorial Videos | Mr. Kishore
** For Online Training Registration: goo.gl/r6kJbB ► Call: +91-8179191999
💡 Also Watch
C Language Tutorials: goo.gl/qDhJ2r
Core Java FAQ's: goo.gl/qGh5mA
Core Java Tutorials: goo.gl/NbaEge
Java Programming Tutorials by Mr.Hari krishna:
goo.gl/HThq6H
Advanced Java Programming Tutorials by Mr.Nataraj:
goo.gl/1U2Qgy
Subscribe to our channel and hit the bell 🔔🔔🔔 icon to get video updates.
💡 Visit Our Websites
For Classroom Training: nareshit.in/cp...
For Online Training: nareshit.com/c...
#JavaCollectionsFramework #Tutorials #Videos #corejava #Quiz #Clanguage
--------------------------
💡 About NareshIT:
"Naresh IT is having 14+ years of experience in software training industry and the best Software Training Institute for online training, classroom training, weekend training, corporate training of Hadoop, Salesforce, AWS, DevOps, Spark, Data Science, Python, Tableau, RPA , Java, C#.NET, ASP.NET, Oracle, Testing Tools, Silver light, Linq, SQL Server, Selenium, Android, iPhone, C Language, C++, PHP and Digital Marketing in USA, Hyderabad, Chennai and Vijayawada, Bangalore India which provides online training across all the locations
--------------------------
💡 Our Online Training Features:
🎈 Training with Real-Time Experts
🎈 Industry Specific Scenario’s
🎈 Flexible Timings
🎈 Soft Copy of Material
🎈 Share Videos of each and every session.
--------------------------
💡 Please write back to us at
📧 us.training@nareshit.com/ 📧 online@nareshit.com or Call us at the USA: ☎+1404-232-9879 or India: ☎ +918179191999
--------------------------
💡 Check The Below Links
► For Course Reg: goo.gl/r6kJbB
► Subscribe to Our Channel: goo.gl/q9ozyG
► Circle us on G+: plus.google.co...
► Like us on Facebook: / nareshit
► Follow us on Twitter: / nareshitek
► Follow us on Linkedin: goo.gl/CRBZ5F
► Follow us on Instagram: goo.gl/3UXYK3

Пікірлер: 117
@NareshIT
@NareshIT 5 жыл бұрын
Please Comment, Subscribe and Click Bell🔔🔔🔔 Icon for More Updates. To learn software course from our experts please register here for online training: goo.gl/HIB0wL
@luckyabby2871
@luckyabby2871 4 жыл бұрын
conio.h is only in Turbo C++, what is the similar header file for standard C++ ?
@luckyabby2871
@luckyabby2871 4 жыл бұрын
this is only shallow copy constructor, you forgot deep copy constructor.
@akshaynikam8508
@akshaynikam8508 3 жыл бұрын
If i dont want to write copy constructor then what is another option for copy constructor... Plz guide...
@arjunsuresh932
@arjunsuresh932 7 жыл бұрын
I rarely comment on KZbin..But this is a very clear nd solid explanation that i found difficult to understand elsewhere out in the internet..Thank you SIR :)
@BiharCentralSchool
@BiharCentralSchool 3 жыл бұрын
I got tired to search & see the many lectures on Copy Constructor but didn't understand, BUT THIS 15 MIN VIDEO TAUGHT ME FROM SCRATCH. THANK U SIR
@gamuchiraimureyani281
@gamuchiraimureyani281 6 жыл бұрын
Sir you have excellent explanation better than my teacher you explain everything clearly.
@ektajha69
@ektajha69 4 жыл бұрын
Ur teaching technique is impeccable sir.Respect 🙏
@AaryaGhuge
@AaryaGhuge 4 жыл бұрын
Thnx for helping me study in quarantine...🙏🏻
@sayalikad2331
@sayalikad2331 7 жыл бұрын
excellent explanation sir...my all concepts of constructors are get cleared by watching this video......
@KaifAli-k8m
@KaifAli-k8m 6 ай бұрын
One of the best lecture on Copy Constructor......😊
@jaysalunke4214
@jaysalunke4214 3 жыл бұрын
Thank you Naresh technologies for making concepts so simple.
@Pluxlite
@Pluxlite 6 жыл бұрын
Oh thank you! this is the first time i actually understood copy constructor!
@TheGeekyTuber
@TheGeekyTuber 3 жыл бұрын
Has to be the most vivid explanation on copy constructors.
@saikun0293
@saikun0293 4 жыл бұрын
Why don't we directly write old instead of &old shouldn't it make old a copy of the class passed for eg if we write sample s2(s1) then old is a copy of s1 and thus a=old.a because this is how we pass integers also for eg: print(int num) { cout
@aishwaryabobe5397
@aishwaryabobe5397 7 жыл бұрын
Excellent explaination sir... Thanks a lot.. upload all videos related to c++
@belevtsof
@belevtsof 7 жыл бұрын
Very good explaining, excellent ! Thank so much from Ukraine
@jahirulhaque2059
@jahirulhaque2059 Жыл бұрын
Super and nice prof. i have ever seen in USA!!!!
@meilyn22
@meilyn22 2 жыл бұрын
Best explanation in the world.
@KashishGulati-bv6gv
@KashishGulati-bv6gv 4 ай бұрын
Thank you sir you help in understanding the topic easily 🙏
@prateekbhojwani9909
@prateekbhojwani9909 6 жыл бұрын
I appreciate Mr. Kishore for such videos. Nice work . Keep going
@InterviewPoint
@InterviewPoint 7 жыл бұрын
Thank you Sir for this video, Sir please make a video on Parameterized Constructor
@shubhangih5309
@shubhangih5309 6 жыл бұрын
Sir please make a video on Parameterized Constructor
@wings7494
@wings7494 3 жыл бұрын
It is there in playlist
@CS_Shorts
@CS_Shorts Жыл бұрын
Best explanation , thank you sir.
@soorajparappinikottil
@soorajparappinikottil 3 жыл бұрын
Excellent.. you make people's life easier.👍
@jeevadas2056
@jeevadas2056 7 жыл бұрын
I would like to bring your attention towards syntax of copy constructor and importance of const keyword. const keyword should be added to avoid accidental modification ,a temporary object cannot bind to a non-const reference
@jawajisamyuktha4580
@jawajisamyuktha4580 2 жыл бұрын
Awesome xplanation sir Tq very much
@shreyamummigatti7050
@shreyamummigatti7050 4 жыл бұрын
excellent explanation sir.... thank you so much
@gowthamis7172
@gowthamis7172 6 жыл бұрын
tiz is first time understood da copy constructor after watching ur videos sir tqqq
@shreyaesha001
@shreyaesha001 2 жыл бұрын
this is the best explanation by far!
@mukulrana1616
@mukulrana1616 3 жыл бұрын
Perfect n smooth explanation
@stuartdhas8468
@stuartdhas8468 3 жыл бұрын
The reference object passed should be const in nature (preferebly)
@vishaljhaveri6176
@vishaljhaveri6176 4 жыл бұрын
Very well explained keeping the grips on the essential part of the programs.
@sendhoorasukeshpk6261
@sendhoorasukeshpk6261 5 жыл бұрын
It's so useful for me Thank you so much
@janardhanjackichan7435
@janardhanjackichan7435 5 жыл бұрын
Explanation super ga undi mi videos download chasukunna from play store
@heenamalek6001
@heenamalek6001 Жыл бұрын
superb sir Thank You 🙏
@Raam1827
@Raam1827 Жыл бұрын
If you gave example with pointer and shallow copy and deep copy in this topic it will much helpful to all
@datastructure_solved5839
@datastructure_solved5839 3 жыл бұрын
Thank you very much sir. . very well explained !
@tushardalave4619
@tushardalave4619 4 жыл бұрын
Very good lecture
@jonathanmedranodanes5508
@jonathanmedranodanes5508 3 жыл бұрын
I have a question: a and b are private variables of s1, using reference variable can bypass data hiding then?
@chayanbandyopadhyay1227
@chayanbandyopadhyay1227 6 жыл бұрын
sir i have a doubt regarding the calling of the copy constructor.... in void main... shall it be sample &s2(s1) ???? please reply sir..!! best xplanation ..!!thanks alot sir..!!
@adityaTheLaughingMonk
@adityaTheLaughingMonk 5 жыл бұрын
givl pgg
@deepakborah8335
@deepakborah8335 7 жыл бұрын
Good explanation about copy constructor.
@moayyadarz2965
@moayyadarz2965 4 жыл бұрын
amazing teacher ı like your way of explaining the ideas
@madhavikatta7346
@madhavikatta7346 4 жыл бұрын
In c++ there is default copy constructor. No need to write separate copy constructor until unless use the dynamic memory allocated to avoid dangling pointer. Sir my sincere request pls give the proper subject to the learners.
@sanamyaqoob3740
@sanamyaqoob3740 4 жыл бұрын
thank u it is very useful for me to understand inheritance
@pratimashashank4601
@pratimashashank4601 5 жыл бұрын
Very good explanation sir
@pratikpatil3469
@pratikpatil3469 3 жыл бұрын
Sir U haven't made any video on parameterized constrictor please make one video on it
@Userindia14567
@Userindia14567 2 жыл бұрын
Excellent👍
@cr7johnChan
@cr7johnChan 2 жыл бұрын
Thank You sir !
@iniyaviji2796
@iniyaviji2796 Жыл бұрын
Thank u sir hats of u
@edipsaln
@edipsaln 5 жыл бұрын
Very good explanation. Thank you.
@girishb2801
@girishb2801 5 жыл бұрын
There should be use of const operator in copy constructor argument. Pls check
@shinjomoxuba8779
@shinjomoxuba8779 3 жыл бұрын
If you are coping all the value of s2 in copy constructor then why do you used parameterize constructor ... Ans please🙏🙏🙏
@pitrya2533
@pitrya2533 7 жыл бұрын
Sometimes we make use of "const" keyword in copy constructor(like sample (sample const &old) What's the purpose?
@jeevadas2056
@jeevadas2056 7 жыл бұрын
I would like to bring your attention towards syntax of copy constructor and importance of const keyword. const keyword should be added to avoid accidental modification ,a temporary object cannot bind to a non-const reference
@SHRAVANKUMAR-yu5cv
@SHRAVANKUMAR-yu5cv 4 ай бұрын
Great 🙏
@govinddwivedy8145
@govinddwivedy8145 6 жыл бұрын
Sir will you please clarify ,why you used & in copy constructor
@anjucreations8124
@anjucreations8124 6 жыл бұрын
copy constructors depends on reference(&) to same class type.
@harsh.sharma
@harsh.sharma 4 жыл бұрын
Who is having exam tomorrow?
@pcellayushbanerjee4621
@pcellayushbanerjee4621 4 жыл бұрын
Phati padi hai bhai
@iamsoul5254
@iamsoul5254 3 жыл бұрын
Yes bro. Watching at 1.75× to save time..😂😂
@viswanathgupta7406
@viswanathgupta7406 7 жыл бұрын
Super Explanation Sir
@dipendrabharati6256
@dipendrabharati6256 5 жыл бұрын
Great Explanation , Thankyou
@Pishkoo
@Pishkoo 3 жыл бұрын
Perfectly awsome🥰
@SarathKumar-tm6ui
@SarathKumar-tm6ui 5 жыл бұрын
thank you so much sir wonderful explanation
@SKMINSARR
@SKMINSARR 3 жыл бұрын
thank you soo much sir
@sammydeew4773
@sammydeew4773 6 жыл бұрын
can u pls explain C programming
@the_aravinth_m
@the_aravinth_m 3 жыл бұрын
Sir ... I don't know why u have deleted the symbal & at timestamp 11:25 ..? anyone plz clarify
@romelelectronics
@romelelectronics 6 жыл бұрын
thank you sir, u r real kind teacher
@jishnujishnu849
@jishnujishnu849 6 жыл бұрын
What is the relavance of &old there Can you please explain
@nilaypaul9810
@nilaypaul9810 4 жыл бұрын
The reference variable means "An alternative Name for the previously defined variable or object or whatever" So when Sample S2(S1) is passed; that means the object S1 is got new name of "OLD" Now, as you can see S1 object has for a= 10 and b = 20; So, in S2, a = old.a; //old is object S1 b = old.b //old is another name for object S2
@bipinkhangar3346
@bipinkhangar3346 4 жыл бұрын
Sir but "this" function me . Nhi chalta na wo to java me hota hai.....cpp me this-> aisa hota hai na shyad???
@bilalsheikh5786
@bilalsheikh5786 3 жыл бұрын
(*this).a and this->a are different syntax for the same operation. You are right that -> is a typical java operator, but it is implemented in newer C++ as well.
@rameshjogi8501
@rameshjogi8501 6 жыл бұрын
What is shallow and deep copy ???
@archanajames2468
@archanajames2468 5 жыл бұрын
Brilliant
@prabha8682
@prabha8682 4 жыл бұрын
Thanx for helping
@arbindmahato2371
@arbindmahato2371 5 жыл бұрын
U r great sir
@MainDoodler
@MainDoodler 4 жыл бұрын
Good, thanks for the lesson. But everyone's using copy contructor even when they assign as s1=s2. Why's copy constructor also invoking at such occurrence? Anyone knows? :)
@vikrantmahajan280
@vikrantmahajan280 4 жыл бұрын
Brother both are valid statement just we need to understand that this s2 value is passing In the constructor.like if we pass two values in constructor we write like s1(4, 3) if we need to pass only one parameter then s1=4 this way is also correct
@VideoLanxer
@VideoLanxer 4 жыл бұрын
I believe the answer will be 10,20 and 10,20 If the answer is same twice, what is the use? ,🤔🤔🤔
@iAlienGirli
@iAlienGirli 4 жыл бұрын
Let's say you need to create the same object twice (or more) and you need to change one of them during your program or whatever... This is how you should create the same objects
@sanjeevkant8470
@sanjeevkant8470 3 жыл бұрын
I think you have to use constant for reference object in copy constructor parameter, otherwise the old object values can be manipulated inside copy constructor, just a suggestion from my side.
@amazingcreator3744
@amazingcreator3744 3 жыл бұрын
Sir can we write s2=s1 like this?
@sreyashreepal3146
@sreyashreepal3146 3 жыл бұрын
where is the parameterized constructor video?? Can anyone share the link??
@pratikkunthe6472
@pratikkunthe6472 4 жыл бұрын
Sir where is parameterized constructor??
@vsarts1967
@vsarts1967 4 жыл бұрын
Watch video number 31 , overloading example 1
@tuttejkumar6713
@tuttejkumar6713 2 жыл бұрын
thank u sir
@unfinished.education
@unfinished.education 7 жыл бұрын
supper se upper sir
@bhaumikk7893
@bhaumikk7893 4 жыл бұрын
good one..
@neerajmahajan9457
@neerajmahajan9457 3 ай бұрын
Best♥
@cristo_sal
@cristo_sal 5 жыл бұрын
What about copying pointer variables?
@Beyond707
@Beyond707 7 жыл бұрын
Excellent
@saptarshibose9718
@saptarshibose9718 5 жыл бұрын
I think the syntax is class_name(const &old_obj);
@viswanathgupta7406
@viswanathgupta7406 7 жыл бұрын
Add more session sir
@hrishikeshkulkarni2856
@hrishikeshkulkarni2856 6 жыл бұрын
awesome sir
@s.chinna3722
@s.chinna3722 3 жыл бұрын
sir in dev c++ software . its showing error when I place . when I remove (.h) its compiling . can u please give me reason sir
@jotu2002
@jotu2002 2 жыл бұрын
When we use turbo c++ or any old complier (I think ) then we need to use .h otherwise in visual studio or other new compilers there is no need
@kalairavichandran558
@kalairavichandran558 6 жыл бұрын
sir,why you removed & in s2
@sofimajeed8342
@sofimajeed8342 6 жыл бұрын
That should not be there
@rajasekharburgala
@rajasekharburgala 5 жыл бұрын
Sample (S2)=S1 Equals to sample S2 = S1, so & is not required
@tanvimahajan2697
@tanvimahajan2697 7 жыл бұрын
where is parameterized constructor video??
@ayushshah7831
@ayushshah7831 6 жыл бұрын
best sir
@RifadIslam
@RifadIslam 5 жыл бұрын
His English accent is just perfect than any other Indian peoples :3
@DewanandSahu01
@DewanandSahu01 7 жыл бұрын
lect 30 then 35 then 34
@akhileshbharati3932
@akhileshbharati3932 4 жыл бұрын
Asp mere ko thik se Nahi samjha maye
@TheAaditvlog.com1
@TheAaditvlog.com1 Жыл бұрын
I got it
@subhajitadhikary155
@subhajitadhikary155 4 жыл бұрын
Thanks a lot sir, really great explanation
@quamzgraphix9826
@quamzgraphix9826 4 жыл бұрын
thank you sir...
@kritithakur5085
@kritithakur5085 6 жыл бұрын
Great sir
@sumasumu3794
@sumasumu3794 3 жыл бұрын
explanation are up to the point and can easily understand sir.tnq sir
@danumichael4864
@danumichael4864 5 жыл бұрын
thanks sir
Constructor with Default Arguments | C++ Tutorial | Mr. Kishore
11:00
Naresh i Technologies
Рет қаралды 44 М.
Constructor Introduction, Default Constructor in C++ | C ++ Tutorial | Mr. Kishore
19:37
Kluster Duo #настольныеигры #boardgames #игры #games #настолки #настольные_игры
00:47
Зу-зу Күлпаш 2. Бригадир.
43:03
ASTANATV Movie
Рет қаралды 679 М.
Don't look down on anyone#devil  #lilith  #funny  #shorts
00:12
Devil Lilith
Рет қаралды 45 МЛН
Destructor in C++ | C++ Tutorial | Mr. Kishore
13:27
Naresh i Technologies
Рет қаралды 89 М.
Constructor Overloading Example-2 | C++ Tutorial | Mr. Kishore
16:07
Naresh i Technologies
Рет қаралды 55 М.
Copying and Copy Constructors in C++
20:52
The Cherno
Рет қаралды 431 М.
Overloading Insertion and  Extraction Operator in C++ | C++ Tutorial | Mr. Kishore
16:55
Multiple Inheritance in C++ | C++ Tutorial | Mr. Kishore
18:18
Naresh i Technologies
Рет қаралды 76 М.
Parameterized Constructors in Inheritance | C++ Tutorial | Mr. Kishore
19:25
Naresh i Technologies
Рет қаралды 60 М.
Constructor Overloading Example-1 | C++ Tutorial | Mr. Kishore
14:39
Naresh i Technologies
Рет қаралды 84 М.
Kluster Duo #настольныеигры #boardgames #игры #games #настолки #настольные_игры
00:47