我运行C ++程序时终端中的奇怪符号

时间:2019-04-22 13:54:09

标签: c++ terminal

我是C ++的初学者,我在下面编写了以下考试程序。

#include <iostream>

int main()
{
    std::cout << "hello, world!";
    return 0;
}

当我在终端中运行它时,它会打印出一个奇怪的符号“%”。

enter image description here

但是,如果我在“ hello,world!”的末尾添加“ \ n”,该符号就会消失!

enter image description here 我不知道“%”符号从何而来。 有人能帮我吗?谢谢。 我的终端是我的zsh。

0 个答案:

没有答案
相关问题