How to write a paragraph explain the Big 3?

This is a discussion on How to write a paragraph explain the Big 3? within the C++ Programming forums, part of the General Programming Boards category; Hi all, I got a question. Does anyone know that how to write a paragraph explaining the Big 3 ...

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    8

    How to write a paragraph explain the Big 3?

    Hi all, I got a question. Does anyone know that how to write a paragraph explaining the Big 3 - destructor, copy constructor and assignment operator?
    Thanks in advance!

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,311
    Yes.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    May 2007
    Posts
    88
    Yes. Start by opening a word processor. Then form complete sentences that support a main idea. Also, be sure to indent the first line.

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,311
    Okay, here is why you have two answers that are rather unhelpful:

    1. You asked a "does anyone know how to" kind of question, which merits a yes/no answer. Of course, people will often understand what you mean and cut out the "does anyone know" to interpret it as a "how to" question, which admittedly is your thread title. But...

    2. You did not make any attempt to answer your own question, thus violating the homework policy.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Registered User
    Join Date
    May 2007
    Posts
    8
    I am not native English speaker. In my case, it is not easy to describe the big 3 well in English.
    My answer is:
    Copy constructor: when creating an object, the compiler calls the constructor automatically.
    Destructor: automatically called by the compiler when an object archieve itsclosure.
    Assignment operator: copy the right hand side into the left hand side.

    I know my answer is not complete, any body can help me?

  6. #6
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    Write your full paragraph, and we'll tell you if we think something is incorrect or missing. Your start seems fine, but if you need to have a paragraph, then you should probably try writing a paragraph.

  7. #7
    Registered User
    Join Date
    May 2007
    Posts
    8
    Copy constructor: when creating an object, the compiler calls the copy constructor automatically and make a copy of the default constructor.*1. When an object archieve itsclosure, the compiler called Destructor automatically to make the object exit.
    Assignment operator copy the right hand side into the left hand side.

    Above is my answer. For *1, I am not sure what will the copy constructor do before teh destructor is called. Any help?

  8. #8
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    >> I am not sure what will the copy constructor do before teh destructor is called.

    What do you mean? The copy constructor, like any other constructor, just constructs the objects. The destructor will be called when that object is destroyed, regardless of which constructor was used to create it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems with fstream, one variabile for write and read
    By Smjert in forum C++ Programming
    Replies: 3
    Last Post: 02-03-2009, 09:19 PM
  2. How to write a program
    By Tashfique in forum C++ Programming
    Replies: 4
    Last Post: 10-17-2008, 11:28 AM
  3. How to write documenation for a Library ?
    By jabka in forum C Programming
    Replies: 2
    Last Post: 01-07-2008, 12:01 PM
  4. C question explain please..
    By code_guru in forum C Programming
    Replies: 3
    Last Post: 11-04-2005, 01:54 AM
  5. Programming Puns
    By kermi3 in forum A Brief History of Cprogramming.com
    Replies: 44
    Last Post: 03-23-2002, 03:38 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21