作者yehes2001 ()
看板EE_DSnP
标题[问题] 初始化不好吗@@
时间Tue Jun 2 10:40:28 2009
我在 class 的 constructor 中 初始化data member
编译器就会有警告
cirStream.h: In constructor
「FileArc::FileArc(const std::string&,
const size_t&,
const std::streampos&,
const std::streampos&,
const std::string&)」:
cirStream.h:18: 警告:「FileArc::_lp」 将随後被初始化
cirStream.h:15: 警告: 「std::string FileArc::_bu」
cirStream.h:11: 警告: 当在这里初始化时
FileArc 有五个 data member
_lp and _bu 是 其中的两个
我好奇的是 为什麽只会抱怨这两个呀@@
谢谢指教~~
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.45.88.237
1F:→ yehes2001:已解决 xD 06/02 12:03
2F:推 ric2k1:所以问题是? 06/02 13:01
3F:推 FATCLOUD:宣告和 constructor 的顺序问题否? 06/02 18:25