C++ Data structure Tree

This is a discussion on C++ Data structure Tree within the C++ Programming forums, part of the General Programming Boards category; I could not find in my book or notes how to find the size of a node in a Tree. ...

  1. #1
    Unregistered
    Guest

    Exclamation C++ Data structure Tree

    I could not find in my book or notes how to find the size of a node in a Tree. Would anyone be able to help me as to how to go about this procedure???

  2. #2
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    struct BTNode {
    BTNode* right;
    BTNode* left;
    double data;
    };

    #include <iostream>
    int main() {
    BTNode temp;
    std::cout << sizeof temp << endl;

    char wait; cin >> wait;
    return 0;
    }
    Last edited by SilentStrike; 10-23-2001 at 10:08 PM.
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    4
    Thank you very much!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Binary Tree, couple questions
    By scoobasean in forum C Programming
    Replies: 3
    Last Post: 03-12-2005, 08:09 PM
  2. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 06:49 PM
  3. gcc problem
    By bjdea1 in forum Linux Programming
    Replies: 13
    Last Post: 04-29-2002, 06:51 PM
  4. Serial Communications in C
    By ExDigit in forum Windows Programming
    Replies: 7
    Last Post: 01-09-2002, 09:52 AM
  5. Array, Linked List, or Binary Tree?
    By Unregistered in forum C Programming
    Replies: 6
    Last Post: 01-05-2002, 09:07 PM

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