#include <iosfwd>
bool DrawClock(WORD wViewChairID, WORD wTimer){
std::ostringstream sstr;
sstr << wTimer;
m_pClock->setString(sstr.str().c_str());// 2013-5-23 下午8:23:13
m_pClock->setVisible(true);// 2013-5-23 下午8:49:41
return true;
}
COCOS2D-X
stringstream是不存在的只有ostringstream可用。
本文介绍了一个Cocos2d-x中的函数DrawClock,该函数利用C++标准库中的ostringstream来设置并显示时间。文章指出,在Cocos2d-x环境中,sstream不可用,仅能使用ostringstream。
1122

被折叠的 条评论
为什么被折叠?



