Hello,

Thanks for your remarks. I couldn't realize that I pass the pointers
to the AlterVector function. How should I take a lead on that in the
future? I should be reading the header files I presume.

> > 2. How could I access vector v2 within AlterVector ? The commented
> > line produces "Undefined symbols: _v2".
> 
> Well, personally I would do it with the following function header:
> 
> void AlterVector(gsl_vector *v1, const gsl_vector *v2) {
>    /* Code altering v1 and *only* reading v2.*/
> }

Absolutely, but this shouldn't solve the problem of accessing
gsl_vector v2 from inside AlterVector, *without* passing it through
the function arguments. I did the following:

-- main.c:
gsl_vector *v2;

main(void) {
    ...
    v2 = gsl_vector_alloc(n);
    ...
}

and sec.c unaltered, and it worked.

Thanks,

-- G.


_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to