Thread: Parallel structures

  1. #1
    Registered User
    Join Date
    Nov 2006

    Parallel structures

    I have a binary search tree class and i need to write functions to peform on a binary search tree such as are two trees similar in structure, what is the height of Tree A, is Tree A perfect and the list goes on. I have figured that I need a list of trees in which trees is another class that has data members

    name: to give the tree a specific name (this implementation is a binary search tree of integers) and bst: the tree associated with the name.

    Can someone clarify that this is not a parallel structure.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Seems to me like you implement the tree class as a template, then you instantiate that template with the data class(es) of your choice.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 07-11-2008, 07:39 AM
  2. Serial to Parallel
    By ssharish2005 in forum Tech Board
    Replies: 11
    Last Post: 09-10-2007, 01:11 PM
  3. Segmentation Fault - Trying to access parallel port
    By tvsinesperanto in forum C Programming
    Replies: 3
    Last Post: 05-24-2006, 03:28 AM
  4. Classes and Structures.
    By jrahhali in forum C++ Programming
    Replies: 6
    Last Post: 03-28-2004, 05:03 PM
  5. Methods for Sorting Structures by Element...
    By Sebastiani in forum C Programming
    Replies: 9
    Last Post: 09-14-2001, 12:59 PM