shallow/deep copying

This is a discussion on shallow/deep copying within the C++ Programming forums, part of the General Programming Boards category; ive been trying to find some info on this shallow/deep copying that i heard about.. but i can't seem to ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    19

    shallow/deep copying

    ive been trying to find some info on this shallow/deep copying that i heard about.. but i can't seem to find it.

    What is the difference between the two, and is this applicable only to linked lists?

    Raz

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    156
    A deep copy is all elements or nodes have their own separate and posibly Identical data. A shallow copy no elements or nodes are duplicated just pointed to for multiple copies.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    19

    so...

    so i have a driver using linked lists and doin shallow copying...
    but how do i overload the assignment operator so it will use deep copying when it assigns a linked list to another linked list?

    Raz

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. copying file from one user directory to another
    By Bargi in forum Linux Programming
    Replies: 6
    Last Post: 05-17-2009, 05:09 PM
  2. Copying Files
    By ch4 in forum C Programming
    Replies: 8
    Last Post: 02-14-2009, 04:15 PM
  3. Deep and Shallow Copying
    By peckitt99 in forum C++ Programming
    Replies: 4
    Last Post: 08-18-2007, 10:37 PM
  4. Copying a whole directory and its content
    By Enira in forum C Programming
    Replies: 4
    Last Post: 03-12-2006, 02:13 PM
  5. Shallow/Deep copying, pointers
    By littleweseth in forum C++ Programming
    Replies: 3
    Last Post: 11-26-2003, 06:36 PM

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