[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] extern vector

From: George Kyriakou
Subject: Re: [Help-gsl] extern vector
Date: Fri, 18 Mar 2005 14:39:46 +0200


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.


-- G.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]