-1

HERE IS WHERE HOW I DECLARED IT IN THE PUBLIC OF "template"

void print();

HERE IS TO PRINT

template<class T>
T XArray<T>::print()
{

    for ( int i = 0; i < size; ++i)
        cout << Array[i] << " ";
    cout << "\n\n";

}

I don't know what I'm doing wrong.

bonafide
  • 368
  • 4
  • 25

1 Answers1

0

Your definition is saying that print returns a T, but your declaration says it return void. Change it to

template<class T>
void XArray<T>::print()
The Dark
  • 8,453
  • 1
  • 16
  • 19