说我要打印:
============ Some message ============
和:
======================= Other Message long one =======================
"="的数量根据消息长度而变化.打印这种东西最有效的方法是什么?
没有提升,请STL.
std::string line(msg.length(), '='); cout << line << "\n" << msg << "\n" << line << endl;