commit c5f2ebb5d65304fcb82c19e4e059f9b1a9cb469c Author: violeteverisland Date: Mon Feb 23 20:46:42 2026 +0800 1 diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..9e7163e --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,11 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 已忽略包含查询文件的默认文件夹 +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +*.exe diff --git a/.idea/editor.xml b/.idea/editor.xml new file mode 100644 index 0000000..aa6a05a --- /dev/null +++ b/.idea/editor.xml @@ -0,0 +1,349 @@ + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..6c0a663 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/学习.iml b/.idea/学习.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/.idea/学习.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..64e6be4 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.1) +project() + +set(CMAKE_CXX_STANDARD 20) + +add_executable(main.cpp) diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..9290406 --- /dev/null +++ b/main.cpp @@ -0,0 +1,16 @@ +#include + +// TIP 要Run代码,请按 或点击装订区域中的 图标。 +int main() { + // TIP 当文本光标位于 lang 变量名称处时,按 可以查看 CLion 如何帮助您重命名该变量。 + auto lang = "C++"; + std::cout << "Hello and welcome to " << lang << "!\n"; + + for (int i = 1; i <= 5; i++) { + // TIP 按 开始调试代码。我们已为您设置了一个 断点,但您可以随时按 添加更多断点。 + std::cout << "i = " << i << std::endl; + } + + return 0; + // TIP 请访问 jetbrains.com/help/clion/ 查看 CLion 帮助。此外,您还可以从主菜单中选择“帮助 | 学习 IDE 功能”,尝试 CLion 的交互式课次。 +} \ No newline at end of file diff --git a/main.exe b/main.exe new file mode 100644 index 0000000..d76125b Binary files /dev/null and b/main.exe differ diff --git a/sizeof函数.cpp b/sizeof函数.cpp new file mode 100644 index 0000000..0aeefd5 --- /dev/null +++ b/sizeof函数.cpp @@ -0,0 +1,20 @@ +// +// Created by viole on 2026/2/20. +// +#include "iostream" +#include "windows.h" +using namespace std; +int main() { + SetConsoleOutputCP(CP_UTF8); + short age = 21; + int num1 = 21; + long num2 = 32; + long long num3 = 42; + cout<<"short的大小是"<