【发布时间】:2016-06-18 07:16:43
【问题描述】:
所以没有代码可以关闭,但是如何在 cpp 中替换控制台应用程序中的一行。因此,无需创建新行,而是替换文本而不创建新行。 字符串切换=“关闭”;
printf("TOGGLE: %s", toggle);//an if statement changes toggle but never changes.
我应该循环吗?
示例:
Toggle: ON //Instead of making a new line saying...
Toggle: OFF // how could i replace the Toggle: ON to say toggle off when i toggle off.
【问题讨论】: