How to use RCPP_MODULE(yada) in C++. My C++ program gives error if I use
const char* hello( std::string who ){
std::string result( "hello " ) ;
result += who ;
return result.c_str() ;
}
RCPP_MODULE(yada)
{
using namespace std;
function( "hello", &hello ) ;
};
Error are:
1. Error 1 error C2065: 'yada' : undeclared identifier
2. Error 2 error C2448: 'RCPP_MODULE' : function-style initializer appears to be a function definition
Can anyone help me in fixing these error?