Format C++ codes in Clang-Format Style: Microsoft

This commit is contained in:
krahets
2023-04-14 03:44:02 +08:00
parent f8513455b5
commit 9c9c8b7574
46 changed files with 732 additions and 888 deletions

View File

@ -6,7 +6,6 @@
#include "../include/include.hpp"
/* Driver Code */
int main() {
/* 初始化哈希表 */
@ -20,7 +19,7 @@ int main() {
map[13276] = "小法";
map[10583] = "小鸭";
cout << "\n添加完成后,哈希表为\nKey -> Value" << endl;
PrintUtil::printHashMap(map);
printHashMap(map);
/* 查询操作 */
// 向哈希表输入键 key ,得到值 value
@ -31,21 +30,21 @@ int main() {
// 在哈希表中删除键值对 (key, value)
map.erase(10583);
cout << "\n删除 10583 后,哈希表为\nKey -> Value" << endl;
PrintUtil::printHashMap(map);
printHashMap(map);
/* 遍历哈希表 */
cout << "\n遍历键值对 Key->Value" << endl;
for (auto kv: map) {
for (auto kv : map) {
cout << kv.first << " -> " << kv.second << endl;
}
cout << "\n单独遍历键 Key" << endl;
for (auto key: map) {
for (auto key : map) {
cout << key.first << endl;
}
cout << "\n单独遍历值 Value" << endl;
for (auto val: map) {
for (auto val : map) {
cout << val.second << endl;
}