the constructor is
TwoD<T>::TwoD( int x, int y)
{
r = x;
c = y;
elet = new int *[r];
for (int i = 0; i < r; i++){
elet[i] = new int [c];
}
for (int i=0; i < r; i++){
for(int j=0; j < c; j++){
elet[i][j] = i*j;
}
}
}
--------------------------
the swap function is
template <class T>
TwoDimArray<T> TwoD<T>::swap(int r, int c )
{
x=r;
y=c;
int *temp;
*temp = elet[x];
elet[x] = elet[y];
elet[xdim] =* temp;
}
---------------------------------
the errors are
P.cpp:30: instantiated from here
TwoD.cpp:153: error: invalid conversion from âint*â to âintâ
TwoD.cpp:155: error: invalid conversion from âintâ to âint*â
any idea fro the mistake ???
in the main the call is:
int main()
{
TwD<int> TwoD2