1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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