-4

I need to print out the "|" symbol on the screen. But I seem to get this instead of correct symbol:

enter image description here

My code looks like this:

for(int i = 0 ; i <=8; i++)
    {
        if(i==0)cout << " ";
        else cout << i; 
        cout << "\|";
    }

How do I do it? Sorry if this is a stupid question...

4

3 回答 3

3
于 2013-08-16T15:47:23.490 回答
1

控制台-> 属性。导航到“字体”选项卡并更改字体,例如“Consolas”它将管道符号显示为|

于 2013-08-16T15:59:04.863 回答
1

在您的字体中,那个小的双竖线|符号。
如果你不喜欢它,改变字体。

于 2013-08-16T15:47:29.497 回答