diff --git a/README.md b/README.md index d41522a..6b1547c 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,11 @@ 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) +* [ProtoBuffer C++ Doc](https://developers.google.com/protocol-buffers/docs/reference/cpp-generated) ## Dev Links diff --git a/section1/oop.cpp b/section1/oop.cpp index dece5a1..9ad4968 100644 --- a/section1/oop.cpp +++ b/section1/oop.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2050 by Chrono +// Copyright (c) 2020 by Chrono // // g++ oop.cpp -std=c++11 -o a.out;./a.out // g++ oop.cpp -std=c++14 -o a.out;./a.out @@ -9,6 +9,10 @@ #include #include +#if(defined (__MINGW64__) || (defined __MINGW32__)) +#include +#endif + #if 1 class Interface {}; 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;