<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi, <div><br></div><div>Please find an answer here. <a href="http://stackoverflow.com/questions/24317910/rcpp-module-for-inheritance-class/24320207#24320207">http://stackoverflow.com/questions/24317910/rcpp-module-for-inheritance-class/24320207#24320207</a></div><div><br></div><div>Romain</div><div><br><div><div>Le 20 juin 2014 à 01:13, Jianyang Zhao <<a href="mailto:uzhao@ucdavis.edu">uzhao@ucdavis.edu</a>> a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hello All,<div><br></div><div>I got a problem when I try module with inheritance class. Basiclly, I can't compile this part.</div><div><br></div><div><div>RCPP_MODULE(PACE){</div><div><span class="" style="white-space:pre">        </span>using namespace Rcpp;</div>
<div><span class="" style="white-space:pre">    </span>class_<FPCAreg>("FPCAreg")</div><div><span class="" style="white-space:pre">         </span>.constructor<List, List, double, double, int, bool, bool>()</div>
<div><span class="" style="white-space:pre">            </span>.field("n", &FPCAreg::n)</div></div><div>                ;</div><div>}</div><div><br></div><div>Here FPCAreg is a inheritance class based on FPCA class, and "n" is defined in FPCA. No matter I use ".field("n", &FPCAreg::n)" or ".field("n", &FPCA::n)". When I use ".field("n", &FPCAreg::n)", the error message is "no matching function for call to blablabla", and for ".field("n", &FPCA::n)", that's same but different class name. Is there any suggestion?</div>
<div><br></div><div>Thanks,</div><div><br></div><div>Jianyang</div></div></blockquote></div></div></body></html>