Files
learn_cpp/转义字符.cpp
2026-02-24 14:03:58 +08:00

13 lines
399 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// Created by violet on 2026/2/24.
//
//转义字符:将普通的字符使用\作为开头将其含义进行转换对照得到ascii表的控制字符的功能
//\n \t \\ \'\"
#include "iostream"
#include "windows.h"
int main() {
SetConsoleOutputCP(CP_UTF8);
std::cout<<"aa\tbbbb"<< std::endl;
std::cout<<"aa\t\tbbbb"<<std::endl;
std::cout<<"aa\taabbbbaabbbb"<<std::endl;
}