【发布时间】:2023-03-28 23:07:01
【问题描述】:
这是我正在使用的常量,它是这样拆分的,因为我不想滚动我的编辑器
const string PROGRAM_DESCRIPTION = "Program will calculate the amount "
"accumulated every month you save, until you reach your goal.";
int main()
{
cout << PROGRAM_DESCRIPTION;
return 0;
}
当前在命令提示符中打印为
Program will calculate the amount accumulated every month you save,until you re
ach your goal.
当它打印出来时,我希望它打印在两个单独的行上,如下所示...
Program will calculate the amount accumulated every month you save,
until you reach your goal.
我不知道将 break 语句放在字符串中的什么位置,以便正确打印出来。
【问题讨论】:
-
您是否尝试过使用
\n插入换行符?