get method

Discussion in 'C++' started by spikestar, Aug 31, 2010.

  1. spikestar

    spikestar New Member

    Joined:
    Aug 31, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    in a header file

    I have a class called tree.h;

    inside that class I have a struct
    Code:
     	struct tree_node
            {
                    tree_node* left;
                    tree_node* right;
                    int x;
                    int y;
            }; 
            tree_node* root; 
    
    inside the .cpp
    file i want to make a method called getRoot()?

    I have no idea how to do it
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice