C++ Programming Tips: Using Non-Member/Friend Function Versions
Consider this scenario: we have a Computer class, and every time we shut down the computer, we need to execute the steps of closing all applications, shutting down, and powering off: class Computer{public: … // Close all applications void closeAllApps() { … } // Execute shutdown void shutdown() { … } // Power off void … Read more