From a2ff73a53f51c613627537b61621a8266383ef1a Mon Sep 17 00:00:00 2001 From: Chrono Date: Thu, 28 Oct 2021 11:03:40 +0800 Subject: [PATCH 1/3] c++ hopl4 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4e98e11..6b1547c 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ docker run -it --rm chronolaw/cpp_study * [Bjarne Stroustrup's FAQ](http://www.stroustrup.com/bs_faq.html) * [Bjarne Stroustrup's C++11 FAQ](http://www.stroustrup.com/C++11FAQ.html) +* [Bjarne Stroustrup's C++ HOPL4 (zh-cn)](https://github.com/Cpp-Club/Cxx_HOPL4_zh) * [C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines) * [OpenResty Code Style Guide(zh-cn)](http://openresty.org/cn/c-coding-style-guide.html) * [Google Code Style Guide](https://google.github.io/styleguide/cppguide.html) From 84bc32f2c2d3719f72e92f8202915956f8fc630b Mon Sep 17 00:00:00 2001 From: ek45 <15509988+ytlw@users.noreply.github.com> Date: Sat, 25 May 2024 20:08:11 +0800 Subject: [PATCH 2/3] support compilation at not-linux platform (#15) --- section1/preprocess.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/section1/preprocess.cpp b/section1/preprocess.cpp index bbf19f3..20c6c35 100644 --- a/section1/preprocess.cpp +++ b/section1/preprocess.cpp @@ -26,6 +26,8 @@ void case1() # #if __linux__ # define HAS_LINUX 1 +#else +# define HAS_LINUX 0 #endif # cout << "linux is " << HAS_LINUX << endl; From 3121dcc32e54d1b721762510fb602df5a035e20a Mon Sep 17 00:00:00 2001 From: ek45 <15509988+ytlw@users.noreply.github.com> Date: Mon, 27 May 2024 09:21:23 +0800 Subject: [PATCH 3/3] support compilation at mingw (#16) Co-authored-by: ytlw --- section1/oop.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/section1/oop.cpp b/section1/oop.cpp index 80b8267..9ad4968 100644 --- a/section1/oop.cpp +++ b/section1/oop.cpp @@ -9,6 +9,10 @@ #include #include +#if(defined (__MINGW64__) || (defined __MINGW32__)) +#include +#endif + #if 1 class Interface {};