1.2. C++ 实践#
1.2.1. CodeBlocks 使用#
Code::Blocks 界面
Title bar, menu bar, tool bar, status bar, project window, editor window
Menu:
File,Edit, …Shortcuts: Ctrl + A/S/Z/X/C/V
Tool bar:
file
redo, undo
cut, copy, paste
search, replace
build, run, build and run, rebuild
debug, set breakpoint
jump, set bookmark
File->new->Project...:Console Application使用
Project Properties检查路径
C++ Reference
1.2.2. C++ 标准库#
https://zh.cppreference.net/cpp/headers.html
C library
<cassert><cctype><climits><cmath><cstdio><cstdlib><cstring><ctime>
Input/Output
<iostream>,<fstream>,<filesystem><format>,<print>
Container
<string>,<string_view><array>,<list>,<map>,<queue>,<set>,<stack>,<vector>,<forward_list>,<tuple>,<unordered_map>,<unordered_set>,<flat_map>,<flat_set>
<chrono><random><limits><numbers><ratio>
1.2.3. 常用工具#
编译器:MSYS2,
gcc,g++,clang,clang++,cl编辑器、IDE:Zed, Code::Blocks, CodeLite, Visual Studio Code
构建系统:
make,cmake,meson,xmake,premake版本管理:
git+ SourceGit/TortoiseGit,svn+ TortoiseSVN文件比较:Meld, Kdiff3, WinMerge
Shell: Cmd, PowerShell, Bash, Fish
终端模拟器:Windows Terminal, Mintty UCRT64, WezTerm, Kitty, Ghostty
1.2.4. TUI#
1.2.5. Raylib#
1.2.6. 高级语法#
array
function
struct
class
union
pointer & reference