George Kyriakou <[EMAIL PROTECTED]> writes:
> Hello all,
>
> it may be a simple question:
>
> 1. In the code below (that compiles cleanly) I pass two variables by
> value in a function that takes pointers as arguments, and I still get
> the desired results. Is this normal?
Well, assuming you talk of the AlterVector function, it expects a
pointer and you pass a pointer. v1 and v2 are *pointers* to gsl_vector
"objects".
> 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.*/
}
--
Joakim Hove
hove AT ift uib no
Tlf: +47 (55 5)8 27 90
Fax: +47 (55 5)8 94 40
http://www.ift.uib.no/~hove/
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl