no argument error while using template

Hello all,

I was trying to make a templated matrix class for basic operations viz addition,subtraction,etc.
While I was able to do all of the functions,I am stuck(compiler shows error) at the following function:
1
2
3
4
5
6
7
8
9
template<class T>
void Matrix<T>::GetOutput()
{
	for(int i=0;i!= m_RowSize;i++)
	{ for (int j=0;j!=m_ColumnSize;j++){
		cout<<endl;
		cout<<GetElememt(i,j);}
	cout<<endl;}
}


g++ compiler says the followinhg:
1
2
3
4
5
Matrix.h: In member function 'void Matrix<T>::GetOutput()':
Matrix.h:108:23: error: there are no arguments to 'GetElememt' that depend on a template parameter, so a declaration of
'GetElememt' must be available [-fpermissive]
Matrix.h:108:23: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name
 is deprecated)
.

Whole class is here http://pastebin.com/86BsQAiD

Any help would be appreciated.Thanks.

Last edited on
You wrote 'GetElememt' instead of 'GetElement'.
Topic archived. No new replies allowed.