// MT1Q3 #include template class sharing { public: T& value() { return t_; } private: static T t_; }; template T sharing::t_ = 0; void scopeOne() { sharing s; std::cout << "\n shared value in scopeOne is: " << s.value(); s.value() = -9.99999; } void scopeTwo() { sharing s; std::cout << "\n shared value in scopeTwo is: " << s.value(); s.value() = 0.00001; } void main() { sharing s; s.value() = 3.1415927; scopeOne(); scopeTwo(); std::cout << "\n shared value in main is: " << s.value() << "\n\n"; }