XZXiaochen Zhouinxiaochenz.hashnode.dev·Sep 25, 2021 · 2 min readMove Semantics and Operator Return TypeLet's look at an example from Exceptional C++ Item 20: Class Mechanics. class Complex { public: explicit Complex(double real, double imaginary = 0) : real_(real), imaginary_(imaginary) {} Complex& operator+=(const Complex& ot...01H
XZXiaochen Zhouinxiaochenz.hashnode.dev·Sep 20, 2021 · 1 min read"Hello World!" in C++ Without SemicolonThis was an interesting puzzle from a training on C++ Standard Template Library. Just as the title says, can you write a "Hello World!" program without using any semicolon ;? It turns out the answer is yes. Hint: the condition of an if statement is a...01A