C++制表符
            
            
                    
                        标签:class   size   png   html   info   tps   方便   world   names   
以下代码复制自https://www.cnblogs.com/wanghui390/p/3764425.html,是为了自己以后查看方便才复制过来的,谢谢原博主。
#includeusing namespace std;
int main()
{
    //制表符是8个字符,当在一个制表符开始的位置(明白什么位置是制表符开始的位置)输出一个字符串时,
    //如果字符串不到8个字符,加一个"\t",会补充空格,达到一个制表符
    char res[] = "hello\tworld";
    cout //不满8个字符,会用空格填充达到8个字符
    cout "hello___world" //中间3个下划线_
    char res2[] = "helloworld\thello";//开始第一个字符串10个字符,加一个制表符,会补充6个空格
    //完成第二个制表符
    cout  endl;
    cout "helloworld______hello" //中间6个下划线_
    return 0;
}
 
运行结果

 
 
 
C++制表符
标签:class   size   png   html   info   tps   方便   world   names   
原文地址:https://www.cnblogs.com/Dana-coder/p/9749645.html
                    
             
            
            
            
            
                
                    文章来自:
搜素材网的
编程语言模块,转载请注明文章出处。
                    文章标题:
C++制表符
                    文章链接:http://soscw.com/index.php/essay/86195.html                
 
            
                                
评论