I know there are tones of other questions like this, but I haven't been able to find the solution to mine. I'm sure it's very simple I just don't understand pointers very well. I'm trying to implement a data stree structure here's the code:
#include <iostream>
using namespace std;
//************************************************************************************
// GLROW CLASS
//************************************************************************************
template <class DT>
class GLRow; //class prototype
template <class DT>
ostream& operator <<(ostream& s, GLRow<DT>& oneGLRow);
template <class DT>
class GLRow {
        friend ostream& operator<< <DT>(ostream& s, GLRow<DT>& oneGLRow);
        protected:
                DT* _Info;
                int _Next;
                int _Down;
        public:
                GLRow ();
                GLRow (const DT& newInfo);
                GLRow (const GLRow<DT>& anotherOne);
                GLRow<DT>& operator= (const GLRow<DT>& anotherOne);             //Make sure you do $
                int getNext();
                int getDown();
                DT& getInfo() const;
                int setNext(int n);
                int setDown(int d);
                int setInfo (const DT& x);
                ~GLRow(); //destructor
};
//************************************************************************************
// ARRAYGLL CLASS
//************************************************************************************
template <class DT>
class ArrayGLL; //class prototype
template <class DT>
ostream& operator <<(ostream& s, ArrayGLL<DT>& oneGLL);
template <class DT>
class ArrayGLL {
        friend ostream& operator<< <DT>(ostream& s, ArrayGLL<DT>& OneGLL);
        protected:
                GLRow<DT>* myGLL;
                int maxSize;                                            //Maximum size of the array$
                int firstElement;
                int firstFree;
        public:
                ArrayGLL ();
                ArrayGLL (int size);
                ArrayGLL (ArrayGLL<DT>& anotherOne);
                ArrayGLL<DT>& operator= (ArrayGLL<DT>& anotherOne);
                void display ();                                        //display in parenthesis fo$
                int find (DT& key);                                     //return the index position$
                void findDisplayPath (DT& Key);                         // as you travel through th$
                int noFree ();                                          //return the number of free$
                int size ();                                            //return the number of elem$
                int parentPos(DT& Key);                                 // provide the location of $
                GLRow<DT>& operator [] (int pos);                       //return the GLRow that is $
                int getFirstFree();
                int getFirstElement();
                void setFirstFree (int pos);
                void setFirstElement (int pos);
                ~ArrayGLL ();                                           //destructor
};
//************************************************************************************
// GLROW CLASS DEFINITIONS
//************************************************************************************
//------------------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------------------
template <class DT>
GLRow<DT>::GLRow()
{
        _Info = nullptr;
        _Next;
        _Down;
}
//------------------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------------------
template <class DT>
GLRow<DT>::GLRow(const DT &newInfo)
{
         _Info = newInfo;
        _Next;
        _Down;
}
template <class DT>
GLRow<DT>::GLRow(const GLRow<DT> & anotherOne)
{
        _Info = anotherOne._Info;
        _Next = anotherOne._Next;
        _Down = anotherOne._Down;
}
//------------------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------------------
template <class DT>
GLRow<DT> & GLRow<DT>::operator=(const GLRow<DT> &anotherOne)
{
        _Info = anotherOne._Info;
        _Next = anotherOne._Next;
        _Down = anotherOne._Down;
}
//------------------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------------------
template <class DT>
int GLRow<DT>::getNext()
{
        return _Next;
}
//------------------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------------------
template <class DT>
int GLRow<DT>::getDown()
{
        return _Down;
}
//------------------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------------------
template <class DT>
DT & GLRow<DT>::getInfo() const
{
        return _Info;
}
//------------------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------------------
template <class DT>
int GLRow<DT>::setNext(int n)
{
        _Next = n;
}
//------------------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------------------
template <class DT>
int GLRow<DT>::setDown(int d)
{
        _Down =d;
}
//------------------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------------------
template <class DT>
int GLRow<DT>::setInfo(const DT &x)
{
        _Info = x;
}
//------------------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------------------
template <class DT>
GLRow<DT>::~GLRow()
{
        _Next = -1;
        _Down = -1;
        delete _Info;
}
I'm getting the error:
In file included from main.cpp:3:0:
tree.cpp: In instantiation of ‘GLRow<DT>::GLRow(const DT&) [with DT = int]’:
main.cpp:10:21:   required from here
tree.cpp:102:9: error: invalid conversion from ‘int’ to ‘int*’ [-fpermissive]
   _Info = newInfo;
         ^
make: *** [main.o] Error 1
I just don't understand why it's a conversion error because _Info is a pointer and I'm passing the address of newInfo into the function? I'm sure it's something super easy, thanks in advance!
 
    