Hi all,

I'm trying to figure out how to pass in an array of integers to a function
inside a module.  For example, adding the following function to
runit.Module.R works fine:

        int bla3( IntegerVector x ) {
              return sum(x);
        }

However, I need to pass an int array, rather than an IntegerVector.  Using
int x[] in the arguments doesn't compile (though I'm unfamiliar with C++ in
general, so maybe this shouldn't work anyway).

Alternatively, should I just cast x from an IntegerVector to an int array?
 I tried various permutations of as, vector, <int>, etc, and would like to
learn the proper way of doing this.

Thanks in advance,
Chris
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to