is private within this context

我在編寫c++的一個類的時候gcc報錯...is private within this context,然後對照報錯研究這個private,上網一查說是類沒加public,一看真是,呵呵😅

...is private within this context這個問題的意思是:某某某個函數或者變量是私有的!
一般解決方案:class加public


如果本博文對您有用,請點贊,如說錯,請評論,謝謝!😊

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章