Quizzes
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
curiously recurring template pattern
:
Content language: Русский
English
Что будет выведено на экран при выполнении следующего кода: #include <iostream> template<class T>struct Counter { Counter() { ++count; } static int count; }; template<class T> int Counter<T>::count = 0; struct Derived1: Counter<Derived1> {}; struct Derived2: Counter<Derived2> {}; int main(int argc, char** argv) { Derived1 a, b; Derived2 c; std::cout << Derived1::count << Derived2::count << '\n'; return 0; }
curiously recurring template pattern
← Prev
1
Next →
Sign Up Now
or
Subscribe for future quizzes