Rcpp function crashes

前端 未结 1 1451
忘了有多久
忘了有多久 2020-12-10 14:43

My problem:

I am using R.3.0.1 together with RStudio 0.97.551 on a 64bit Windows7 PC and I have begun to outsource a function to C/C++ using Rcpp. The function comp

相关标签:
1条回答
  • 2020-12-10 15:06

    You are making an elementary C/C++ error:

    for(int i=0; i<n+1; i++)
    

    will be accessed n+1 times, but you allocated n spaces.

    0 讨论(0)
提交回复
热议问题