1. 程式人生 > >omnet++ invalid use of member (did you forget the '&' ?)

omnet++ invalid use of member (did you forget the '&' ?)

Node.cc:897:24: error: invalid use of member (did you forget the '&' ?)

     for(int j = 0 ;j < size;j++)

原因我這裡size,沒有定義。本來前面定義了size變數,但後面為了命名上能看得懂,就改了,但是這裡忘記改了。於是就提示這個錯誤

並且cmodule.h裡面還有這個函式 

 int size() const  {return getVectorSize();}