Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 07-05-2006, 09:03 AM   #1 (permalink)
Alpha Geek
 
ymhatre's Avatar
 
Join Date: Jan 2006
Location: Mumbai, Vile Parle - East
Posts: 510
Default Copy Construcor Help...


Guys im not abble to understand cpy constructor in C++...
Im a rookie in c++ n currently doing engg First year....
I hav read many of online copy constructor programs but it was of no use.... Confusion still exist
I want to know basic use of it, how t use it , and wht r its advantages...
Please explain me this in easy language....
thnx
__________________
!!!From DusT it StartS...... to DusT will EnD!!!!
DusT = ME

Rate me if was clear to you
ymhatre is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 07-05-2006, 01:33 PM   #2 (permalink)
Broken In
 
Join Date: Aug 2004
Location: Behind u with a knife-hehe-Mumbai!!
Posts: 142
Default Re: Copy Construcor Help...

Man...for First year engg in Mumbai university..stick to the textboks..dont go online...
coz we guys r learning really basic stuff..even some wrong stuff..stuff dat has not been in use nowadays
Neways..get E.Balaguruswamy and study copy constructors
I dont have my copy lying around..but from what i remember..

It can be used to create a an object that is a copy of an already defined object..i.e. with class variabled given values.

Ok..found it..u sure are lucky..it was near my PC..page 139,balaguruswamy:
a copy constructor is use to declare and initialize an object from anoder object
i. Integer i2(i1);
this would define object i2 and initailize its values to dat of i1 variables
u cud also use integer i2=i1

this statements wont work if u havent defined a copy constructor.

i assume u know a constructor integer i3(10,50) wud initialize i3 variables to 10,50..in d copy constructor case..it wud give dem values of the object in the bracket...got it??
BTW..how does this come under open source??
__________________
If u think u r right...u r a bad thinker!
Jatin_T is offline  
Old 07-05-2006, 07:46 PM   #3 (permalink)
Alpha Geek
 
ymhatre's Avatar
 
Join Date: Jan 2006
Location: Mumbai, Vile Parle - East
Posts: 510
Default Re: Copy Construcor Help...

Thnx alot jatin....
it was really help ful....
but i still want to undergo few more examples...
problem is i dont hav balguruswamy,
actually i was confused were to post this thread so i did open source....
Please if u hav any more examples post here....
THNX
__________________
!!!From DusT it StartS...... to DusT will EnD!!!!
DusT = ME

Rate me if was clear to you
ymhatre is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Sujeet
- by Krow
- by abhidev
- by topgear

Advertisement




All times are GMT +5.5. The time now is 07:24 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2