What can go wrong?
I have an assignment from a vector to another, that is:
It gives a seg fault.
ptrlin.assign( A.ptrlin.begin(), A.ptrlin.end() )
A.ptrlin is well defined, and I'm not trying to copy from ptrlin.
Program received signal SIGSEGV, Segmentation fault.
0x003b0003 in memmove () from /lib/tls/libc.so.6
It started when...
and the definition:
READ (..., *G, ...);
READ (string src, MATRIX & G, ...)
int n, m;
cout << "Error\n";
file >> n >> m;
G = ZEROS <MATRIX> (n,n);
Can anybody help me?
void MATRIX::operator= (MATRIX const &A)
if (this == &A)
n_lin = A.n_lin;
n_col = A.n_col;
numel = A.numel;
G isn't pointing to anything, is it?
Maybe you need to do
MATRIX *G = new MATRIX;
Yes indeed, as MATRIX *G was a member of a class, I forgot to initialize it after a clear call, so there it is. Sorry for bringing silly problems, and thank you very much for your help.