开发者

Cannot Modify Non Const Member in Class

I try to modify one specific method in OpenCV. In the class definition;

class CV_EXPORTS CvANN_MLP : public CvStatModel
... 
protected
...
int activ_func;

when I try to modify activ_func field, I get:

error: assignment of data-member in read-only structure

error, however it is not defi开发者_开发问答ned as const, how is that possible?


Unfortunately, you didn't give the context of the assignment statement itself. But I'm guessing that you're trying to assign to activ_func from a const member function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜