<div dir="ltr">Hi, Mounia,<div><br></div><div>In Rcpp, using std::vector is preferred.</div><div><br></div><div>It is still possible to use pointers, however, I am afraid you need to write your "as" and "wrap" by yourself. You can find how to develop them in our documents.</div><div><br></div><div>Best,</div><div><br></div><div>Qiang Kou</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 13, 2018 at 4:15 AM Mounia ZAOUCHE <<a href="mailto:mounia.zaouche@agroparistech.fr">mounia.zaouche@agroparistech.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><div><br></div><div>Dear all. <br></div><div><br></div><div>I write C++ programs and I'm currently trying to interface them with R.</div><div><br></div><div>I have two issues :</div><div><br></div><div>Is it possible to interface a function which has an argument that is a pointer (standing for an array) ?</div><div><br></div><div>I also wrote a function whose aim is to allocate (and fill) an array of values. In this purpose, this function takes as an argument the address of the array to be allocated and is thus typed as a pointer of pointer.</div><div>Is it possible to handle such a type and to allocate the required memory inside this function interfaced in R?</div><div><br></div><div>Thank you in advance.</div><div><br></div><div>Mounia Zaouche.</div><div><br></div></div></div>_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a></blockquote></div>