This commit is contained in:
2026-02-24 14:03:58 +08:00
parent 397c928058
commit b824e76a0c
3 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
//
// Created by violet on 2026/2/24.
//
#include "iostream"
#include "windows.h"
int main() {
SetConsoleOutputCP(CP_UTF8);
long long int i1 = 2212345678;
std::cout<<sizeof(i1)<<i1<<std::endl;
char a = 3;
char b = 32;
char c = 16;
char d = 17;
char e = '5';
char f = 126;
std::cout << f << std::endl;
std::cout <<c<<a<<b<<d<<e<<std::endl;
}

14
字符串.cpp Normal file
View File

@@ -0,0 +1,14 @@
//
// Created by violet on 2026/2/24.
//
#include <iostream>
namespace std {
int x =1;
}
int main() {
int a = 1;
auto b = std::x+1;
std::cout <<b<< std::endl;
return 0;
}

13
转义字符.cpp Normal file
View File

@@ -0,0 +1,13 @@
//
// 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;
}