Segmentation faul

in the main the call is:
int main()
{
TwD<int> TwoD2

TwD2.swap( 2,4 );

return 0;
}

template <class T>
TwoDimArray<T> TwoD<T>::swap(T r, T c )
{

T *temp;
temp = elet[r];//elet is vmenber with **
elet[r] = elet[c];
elet[r] = temp;
}
aferte swap funtion
0x8200018

Segmentation faul
You are not checking for substricting boundaries
Topic archived. No new replies allowed.