jjzjj

c++ - 尝试使用 RcppArmadillo 编写 setdiff() 函数会出现编译错误

我正在尝试使用RcppArmadillo在C++中编写R的setdiff()函数的一种模拟。我相当粗糙的方法://[[Rcpp::export]]arma::uvecmy_setdiff(arma::uvecx,arma::uvecy){//Coefficientesofunsignedintegervectoryformasubsetofthecoefficientsofunsignedintegervectorx.//Returnssetdifferencebetweenthecoefficientsofxandthoseofyintn2=y.n_elem;uwordq1;for(