From 7240a40b7c6b550f3e62fca53dbc5ef45282c91d Mon Sep 17 00:00:00 2001 From: HelixCopex Date: Tue, 4 Nov 2025 20:45:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8BCMake=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ .vscode/launch.json | 7 +++++++ CMakeLists.txt | 5 +++++ README.md | 6 +++++- src/c1_1.cpp | 7 +++++++ 5 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json create mode 100644 CMakeLists.txt create mode 100644 src/c1_1.cpp diff --git a/.gitignore b/.gitignore index e257658..6dc0a1b 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,6 @@ *.out *.app +# Target files +build/* +.cache \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..f980ab9 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,7 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [] +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..46987a8 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.28.3) + +project(cpp_course) + +add_executable(c1_1 src/c1_1.cpp) \ No newline at end of file diff --git a/README.md b/README.md index d700318..578082a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # cpp_course -C++笔记与教程仓库 \ No newline at end of file +C++笔记与教程仓库 + +## 前言 + +本仓库旨在为新入门 C++ 的同学提供一个良好的开发环境与工程示例。与学校课程不同的是,本仓库中的示例使用了许多现代工具和代码工程管理方法,同时结合 Git 使用,力图通过环境配置让各位同学了解现代软件开发方法与战队的项目管理方法。 \ No newline at end of file diff --git a/src/c1_1.cpp b/src/c1_1.cpp new file mode 100644 index 0000000..459b2e7 --- /dev/null +++ b/src/c1_1.cpp @@ -0,0 +1,7 @@ +#include + +int main(void) +{ + std :: cout << "Hello World"; + return 0; +} \ No newline at end of file