> void addMsg(World& w2) { > msg = msg + w2.msg; > } BTW, this could be (and should be) void addMsg(const World& w2) { ...}
> error: no matching function for call to ‘World::World(SEXPREC*&)’ How about something like: World(SEXPREC* &w2){ msg= ((World*)w2)->msg; } Darren -- Darren Cook, Software Researcher/Developer http://dcook.org/work/ (About me and my work) http://dcook.org/blogs.html (My blogs and articles) _______________________________________________ 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