1. 手写一个线程安全的单例模式(要求使用C++11特性)答案: class Singleton { private: Singleton() {} ~Singleton() {} Singleton(const Singleton&) = delete; Singleton& operator=(const Singleton&) = delete; public: static Singleton& getInstance() { static Singleton instance; // C++11保证线程安全 return instance; } voi...