2
C ++ 20 में नामित इनिशियलाइज़र
मुझे c ++ 20 फीचर में से एक के बारे में एक प्रश्न मिला है, नामित इनिशियलाइज़र (इस फ़ीचर के बारे में अधिक जानकारी यहाँ ) #include <iostream> constexpr unsigned DEFAULT_SALARY {10000}; struct Person { std::string name{}; std::string surname{}; unsigned age{}; }; struct Employee : Person { unsigned salary{DEFAULT_SALARY}; }; …