Understanding error messages in Rcpp code with structures and functions
I'm getting a couple of error messages when I run the following code that I do not understand - expected initializer before 'add_f' no matching function for call to 'try_grid::try_grid(Rcpp::NumericMatrix&, Rcpp:: NumericMatrix&, int&) Can someone explain what I am doing incorrectly? cpp file: #include <Rcpp.h> using namespace Rcpp; //Declaring a structure struct try_grid { NumericMatrix x; NumericMatrix y; int size; } // Declaring function Void add_f(const try_grid&); // [[Rcpp::export]] NumericMatrix plussomething(NumericMatrix samp, NumericMatrix tramp, int size) { // Declaring and defining
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.