Mail Archives: djgpp/1999/05/19/15:50:36
Hello,
I've tried to add a copy constructor, but still got the same error:
[main] C:\WINDOWS\DESKTOP\A.EXE 1010 (0) handle_exceptions: Exception:
STATUS_ACCESS_VIOLATION
[main] A 1010 (0) handle_exceptions: Dumping stack trace to A.EXE.core
Besides, compiler report as below, but I have no idea what is going on,
besides, it seems to warn for the 1st instantiation of a<T>::~a<T> only,
it does not warn on a<float>::~a<float>. But when I inverse order of
declaration of a<float> and a<int> it warn on a<float>. What is it all
about.
test.cpp: In instantiation of `a<int>::~a<int>()':
test.cpp:65: instantiated from here
test.cpp:65: warning: template `a<int>::~a<int>()' instantiated in file
without #pragma interface
// copy constructor
template < class U > a(const a<U> &v)
{
t=new T[256];
int i;
for(i=0;i<256;i++)
{
t[i]=T(v.t[i]);
}
};
- Raw text -