huangmingchuan / Cpp_Primer_Answers

《C++ Primer》第五版中文版习题答案

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

练习7.32 私有成员screens 未定义

bigOK666 opened this issue · comments

commented

在Window_mgr中的私有成员screens未定义,会导致成员函数clear中的s未定义。
Screen &s = screens[i];//screens未定义

在Window_mgr::clear定义前定义私有成员screens:Window_mgr::Window_mgr():screens{ Screen(8, 5, ' ') }{}