开发者

Cannot Modify Non Const Member in Class

开发者 https://www.devze.com 2022-12-16 11:12 出处:网络
I try to modify one specific method in OpenCV. In the class definition; class CV_EXPORTS CvANN_MLP : public CvStatModel

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

精彩评论

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

关注公众号