diff --git a/cmake-build-debug/.ninja_deps b/cmake-build-debug/.ninja_deps index dce7b24..98cc5ff 100644 Binary files a/cmake-build-debug/.ninja_deps and b/cmake-build-debug/.ninja_deps differ diff --git a/cmake-build-debug/.ninja_log b/cmake-build-debug/.ninja_log index 77819ff..acbd072 100644 --- a/cmake-build-debug/.ninja_log +++ b/cmake-build-debug/.ninja_log @@ -19,3 +19,5 @@ 180 229 1664115743542209642 MSTL 5fce564c316cd3aa 0 181 1664115749406173515 CMakeFiles/MSTL.dir/main.cpp.o 134556d569115d52 181 230 1664115749454173219 MSTL 5fce564c316cd3aa +1 192 1664116226535223733 CMakeFiles/MSTL.dir/main.cpp.o 134556d569115d52 +192 243 1664116226587223410 MSTL 5fce564c316cd3aa diff --git a/cmake-build-debug/CMakeFiles/MSTL.dir/main.cpp.o b/cmake-build-debug/CMakeFiles/MSTL.dir/main.cpp.o index 210a3c8..fec3019 100644 Binary files a/cmake-build-debug/CMakeFiles/MSTL.dir/main.cpp.o and b/cmake-build-debug/CMakeFiles/MSTL.dir/main.cpp.o differ diff --git a/cmake-build-debug/MSTL b/cmake-build-debug/MSTL index 506a0ed..a130e4a 100755 Binary files a/cmake-build-debug/MSTL and b/cmake-build-debug/MSTL differ diff --git a/cmake-build-debug/Testing/Temporary/LastTest.log b/cmake-build-debug/Testing/Temporary/LastTest.log index 58c6b12..9364158 100644 --- a/cmake-build-debug/Testing/Temporary/LastTest.log +++ b/cmake-build-debug/Testing/Temporary/LastTest.log @@ -1,3 +1,3 @@ -Start testing: Sep 25 22:22 CST +Start testing: Sep 25 22:30 CST ---------------------------------------------------------- -End testing: Sep 25 22:22 CST +End testing: Sep 25 22:30 CST diff --git a/main.cpp b/main.cpp index 30ab2ff..73f83ab 100644 --- a/main.cpp +++ b/main.cpp @@ -1,12 +1,13 @@ #include #include "h/LinkList.h" +#include "h/String.h" int main() { - Link *link = new Link; - link->add(6); - link->add(7); - link->add(8); - auto begin = link->begin(); - std::cout << ++begin->data << std::endl; + String string("123456"); + // 赋值 重载函数 返回了 *this + // 这使得以 目的值具有 对象的this + // 更改的值 不在函数内 而是申请的堆中 + String str = string; + std::cout << str.get_c_str() << std::endl; return 0; }