重新编写了 Cplus 分支的 README 文件,增加了每个 Cplus 工程的详细解释
This commit is contained in:
parent
33830aec9d
commit
04eeda0315
Binary file not shown.
@ -3,4 +3,5 @@ project(01_Clion_Cplus_learn_20240419)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
add_executable(01_Clion_Cplus_learn_20240419 main.cpp)
|
||||
add_executable(01_Clion_Cplus_learn_20240419 main.cpp
|
||||
src/20240623_test.cpp)
|
||||
|
@ -39,7 +39,7 @@
|
||||
{
|
||||
"directoryIndex" : 0,
|
||||
"id" : "01_Clion_Cplus_learn_20240419::@6890427a1f51a3e7e1df",
|
||||
"jsonFile" : "target-01_Clion_Cplus_learn_20240419-Debug-09450770b991e1cb3740.json",
|
||||
"jsonFile" : "target-01_Clion_Cplus_learn_20240419-Debug-20463439a75dfeacf005.json",
|
||||
"name" : "01_Clion_Cplus_learn_20240419",
|
||||
"projectIndex" : 0
|
||||
}
|
@ -26,7 +26,7 @@
|
||||
"objects" :
|
||||
[
|
||||
{
|
||||
"jsonFile" : "codemodel-v2-139163e23dc5850e8aa0.json",
|
||||
"jsonFile" : "codemodel-v2-39920e00ac8c96f9b8a2.json",
|
||||
"kind" : "codemodel",
|
||||
"version" :
|
||||
{
|
||||
@ -86,7 +86,7 @@
|
||||
},
|
||||
"codemodel-v2" :
|
||||
{
|
||||
"jsonFile" : "codemodel-v2-139163e23dc5850e8aa0.json",
|
||||
"jsonFile" : "codemodel-v2-39920e00ac8c96f9b8a2.json",
|
||||
"kind" : "codemodel",
|
||||
"version" :
|
||||
{
|
@ -52,7 +52,8 @@
|
||||
},
|
||||
"sourceIndexes" :
|
||||
[
|
||||
0
|
||||
0,
|
||||
1
|
||||
]
|
||||
}
|
||||
],
|
||||
@ -89,7 +90,8 @@
|
||||
"name" : "Source Files",
|
||||
"sourceIndexes" :
|
||||
[
|
||||
0
|
||||
0,
|
||||
1
|
||||
]
|
||||
}
|
||||
],
|
||||
@ -100,6 +102,12 @@
|
||||
"compileGroupIndex" : 0,
|
||||
"path" : "main.cpp",
|
||||
"sourceGroupIndex" : 0
|
||||
},
|
||||
{
|
||||
"backtrace" : 1,
|
||||
"compileGroupIndex" : 0,
|
||||
"path" : "src/20240623_test.cpp",
|
||||
"sourceGroupIndex" : 0
|
||||
}
|
||||
],
|
||||
"type" : "EXECUTABLE"
|
Binary file not shown.
@ -1,4 +1,37 @@
|
||||
# ninja log v5
|
||||
0 83 7392744509454435 build.ninja ac5c3fcc37c06dd7
|
||||
2 228 7352471267487245 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
229 292 7352471268107909 01_Clion_Cplus_learn_20240419.exe be1b2408599ad2f0
|
||||
0 83 7408165725092345 build.ninja ac5c3fcc37c06dd7
|
||||
3 58 7408167526139285 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/src/20240623_test.cpp.obj e3856c0587611d0e
|
||||
1 300 7409236078721925 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
301 373 7409236079432855 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
2 300 7409236828173108 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
300 373 7409236828894353 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
2 343 7409238024768229 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
343 423 7409238025558393 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
2 292 7409239937829646 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
294 376 7409239938650668 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
2 283 7409240360526748 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
283 360 7409240361267311 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
2 296 7409240846149569 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
296 372 7409240846890281 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
2 278 7409241320679728 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
279 351 7409241321380117 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
2 280 7409241770008604 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
280 354 7409241770728671 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
2 286 7409242297172953 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
286 357 7409242297853665 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
2 291 7409242854676914 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
291 369 7409242855437663 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
4 283 7409243337655725 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
283 360 7409243338405864 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
2 288 7409243739619854 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
288 360 7409243740320558 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
3 277 7409244147412405 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
277 348 7409244148102581 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
2 334 7409248100056227 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
335 413 7409248100806098 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
2 291 7409249147788557 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
291 365 7409249148498473 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
2 321 7409249828524641 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
322 393 7409249829224627 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
2 299 7409249970895355 CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj 7f2c522ff8b33c9b
|
||||
299 385 7409249971735351 01_Clion_Cplus_learn_20240419.exe 8bf8803d67a99bcc
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
"E:\Software\CLion 2023.3.4\bin\cmake\win\x64\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_MAKE_PROGRAM=E:/Software/CLion 2023.3.4/bin/ninja/win/x64/ninja.exe" -G Ninja -S E:\SYSTEM\Desktop\PROJECT\CodeLibrary_Next\Cplus\01_Clion_Cplus_learn_20240419 -B E:\SYSTEM\Desktop\PROJECT\CodeLibrary_Next\Cplus\01_Clion_Cplus_learn_20240419\cmake-build-debug
|
||||
-- Configuring done (0.3s)
|
||||
-- Configuring done (0.4s)
|
||||
-- Generating done (0.0s)
|
||||
-- Build files have been written to: E:/SYSTEM/Desktop/PROJECT/CodeLibrary_Next/Cplus/01_Clion_Cplus_learn_20240419/cmake-build-debug
|
||||
|
@ -1,3 +1,3 @@
|
||||
Start testing: Jun 05 15:07 中国标准时间
|
||||
Start testing: Jun 24 17:36 中国标准时间
|
||||
----------------------------------------------------------
|
||||
End testing: Jun 05 15:07 中国标准时间
|
||||
End testing: Jun 24 17:36 中国标准时间
|
||||
|
@ -55,6 +55,12 @@ build CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj: CXX_COMPILER__0
|
||||
OBJECT_DIR = CMakeFiles\01_Clion_Cplus_learn_20240419.dir
|
||||
OBJECT_FILE_DIR = CMakeFiles\01_Clion_Cplus_learn_20240419.dir
|
||||
|
||||
build CMakeFiles/01_Clion_Cplus_learn_20240419.dir/src/20240623_test.cpp.obj: CXX_COMPILER__01_Clion_Cplus_learn_20240419_unscanned_Debug E$:/SYSTEM/Desktop/PROJECT/CodeLibrary_Next/Cplus/01_Clion_Cplus_learn_20240419/src/20240623_test.cpp || cmake_object_order_depends_target_01_Clion_Cplus_learn_20240419
|
||||
DEP_FILE = CMakeFiles\01_Clion_Cplus_learn_20240419.dir\src\20240623_test.cpp.obj.d
|
||||
FLAGS = -g -fdiagnostics-color=always
|
||||
OBJECT_DIR = CMakeFiles\01_Clion_Cplus_learn_20240419.dir
|
||||
OBJECT_FILE_DIR = CMakeFiles\01_Clion_Cplus_learn_20240419.dir\src
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# Link build statements for EXECUTABLE target 01_Clion_Cplus_learn_20240419
|
||||
@ -63,7 +69,7 @@ build CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj: CXX_COMPILER__0
|
||||
#############################################
|
||||
# Link the executable 01_Clion_Cplus_learn_20240419.exe
|
||||
|
||||
build 01_Clion_Cplus_learn_20240419.exe: CXX_EXECUTABLE_LINKER__01_Clion_Cplus_learn_20240419_Debug CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj
|
||||
build 01_Clion_Cplus_learn_20240419.exe: CXX_EXECUTABLE_LINKER__01_Clion_Cplus_learn_20240419_Debug CMakeFiles/01_Clion_Cplus_learn_20240419.dir/main.cpp.obj CMakeFiles/01_Clion_Cplus_learn_20240419.dir/src/20240623_test.cpp.obj
|
||||
FLAGS = -g
|
||||
LINK_LIBRARIES = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
|
||||
OBJECT_DIR = CMakeFiles\01_Clion_Cplus_learn_20240419.dir
|
||||
|
@ -1,32 +1,53 @@
|
||||
/*
|
||||
* Code: Cplus学习
|
||||
* Date: 2024-04-19
|
||||
* Design by JRNitre
|
||||
*
|
||||
* Function:
|
||||
* * 构造函数
|
||||
* * 析构函数
|
||||
* */
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class person{
|
||||
class Solution {
|
||||
public:
|
||||
// 构造函数 - 无参
|
||||
person(){
|
||||
cout << "no parameter structure function" << endl;
|
||||
}
|
||||
vector<int> nextGreaterElements(vector<int>& nums) {
|
||||
vector<int> ret;
|
||||
int ns = nums.size();
|
||||
for (int i = 0; i < ns; i++){
|
||||
int j;
|
||||
if (i < nums.size() - 1){
|
||||
j = i + 1;
|
||||
} else {
|
||||
j = 0;
|
||||
}
|
||||
|
||||
// 析构函数 - 无参
|
||||
~person(){
|
||||
cout << "no parameter destructors function" << endl;
|
||||
}
|
||||
while (true){
|
||||
if (nums[i] < nums[j]){
|
||||
ret.push_back(nums[j]);
|
||||
break;
|
||||
}
|
||||
|
||||
if (j < nums.size() - 1){
|
||||
j++;
|
||||
} else {
|
||||
j = 0;
|
||||
}
|
||||
|
||||
if (i == j){
|
||||
ret.push_back(-1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
|
||||
int main() {
|
||||
person p1;
|
||||
system("pause");
|
||||
// vector<int> v = {1, 2, 3, 4, 3};
|
||||
vector<int> v = {1, 2, 1};
|
||||
|
||||
Solution s_1;
|
||||
vector<int> vs = s_1.nextGreaterElements(v);
|
||||
|
||||
for (auto array: vs){
|
||||
cout << array << " ";
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
0
01_Clion_Cplus_learn_20240419/src/20240623_test.cpp
Normal file
0
01_Clion_Cplus_learn_20240419/src/20240623_test.cpp
Normal file
101
README.md
101
README.md
@ -1,11 +1,96 @@
|
||||
# C 代码部分
|
||||
# C/C++
|
||||
|
||||
## 项目工程命名
|
||||
这里负责存储 C/C++ 代码的分支
|
||||
|
||||
---
|
||||
> 该项目下存储工程文件的命名规范如下
|
||||
|
||||
* 序号
|
||||
* IDE
|
||||
* 所用语言
|
||||
* 项目简述
|
||||
* 时间戳
|
||||
- 两位阿拉伯数字构成的序号,顺序增加其是工程的唯一 ID: 01、02、03...
|
||||
- 项目所用 IDE 的名称
|
||||
- 项目所使用的编程语言
|
||||
- 简短的项目描述
|
||||
- 项目创建日期,必须为 **YYYY-MM-DD** 格式
|
||||
|
||||
其中项目序号和创建日期共同构成了 MAShiroSystem 代码管理体系中的 **唯一ID**
|
||||
|
||||
## 工程描述
|
||||
|
||||
### 0120240419
|
||||
|
||||
- 工程 ID: 01202404-19
|
||||
- 项目创建日期: 2024-0624
|
||||
- 工程全名: 01_Clion_Cplus_learn_20240419
|
||||
- 所用 IDE: JetBrains Clion
|
||||
- 编程语言: C++
|
||||
- 工程描述: 用于存储学习 c++ 时的代码
|
||||
|
||||
### 0220240420
|
||||
|
||||
- 工程 ID: 0220240420
|
||||
- 项目创建日期: 2024-04-20
|
||||
- 工程全名: 02_vscode_Cplus_Project_20240420
|
||||
- 所用 IDE: Visual Studio Code
|
||||
- 编程语言: C++
|
||||
- 工程描述: 用于调试 vs code 编写 C++ 代码的工程
|
||||
|
||||
### 0320240421
|
||||
|
||||
- 工程 ID: 0320240421
|
||||
- 项目创建日期: 2024-04-21
|
||||
- 工程全名: 03_Clion_Cplus_assignment_20240421
|
||||
- 所用 IDE: JetBrains Clion
|
||||
- 编程语言: C++
|
||||
- 工程描述: 课程: 算法分析与程序设计 课程实验报告二 源码
|
||||
|
||||
### 0420240423
|
||||
|
||||
- 工程 ID: 0420240423
|
||||
- 项目创建日期: 2024-04-23
|
||||
- 工程全名: 04_QtCreator_Cplus_TCPClient_20240423
|
||||
- 所用 IDE: Qt Creator
|
||||
- 编程语言: C++
|
||||
- 工程描述: Qt 开发学习 TCP客户端程序
|
||||
|
||||
### 0520240423
|
||||
|
||||
- 工程 ID: 0520240423
|
||||
- 项目创建日期: 2024-04-23
|
||||
- 工程全名: 05_QtCreator_Cplus_TCPServer_20240423
|
||||
- 所用 IDE: Qt Creator
|
||||
- 编程语言: C++
|
||||
- 工程描述: Qt 开发学习 TCP服务端程序
|
||||
|
||||
### 0620240425
|
||||
|
||||
- 工程 ID: 0620240425
|
||||
- 项目创建日期: 2024-04-25
|
||||
- 工程全名: 06_QtCreator_Cplus_SerialDebug_20240425
|
||||
- 所用 IDE: Qt Creator
|
||||
- 编程语言: C++
|
||||
- 工程描述: Qt 开发学习 串口调试助手程序 [开发中]
|
||||
|
||||
### 0720240601
|
||||
|
||||
- 工程 ID: 0720240601
|
||||
- 项目创建日期: 2024-06-01
|
||||
- 工程全名: 07_Clion_Cplus_work_20240601
|
||||
- 所用 IDE: JetBrains Clion
|
||||
- 编程语言: C++
|
||||
- 工程描述: 课程: 算法分析与程序设计 课程实验报告三 源码
|
||||
|
||||
### 0820240610
|
||||
|
||||
- 工程 ID: 0820240610
|
||||
- 项目创建日期: 2024-06-10
|
||||
- 工程全名: 08_Clion_Cplus_MultiLeveMenu_20240610
|
||||
- 所用 IDE: JetBrains Clion
|
||||
- 编程语言: C++
|
||||
- 工程描述: 多级菜单实验程序
|
||||
|
||||
### 0920240620
|
||||
|
||||
- 工程 ID: 0920240620
|
||||
- 项目创建日期: 2024-06-20
|
||||
- 工程全名: 09_Clion_Cplus_work_20240620
|
||||
- 所用 IDE: JetBrains Clion
|
||||
- 编程语言: C++
|
||||
- 工程描述: 课程: 算法分析与程序设计 课程实验报告四 源码
|
||||
|
Loading…
Reference in New Issue
Block a user