Can a class have a static inner class in C++? – Enpatika
Skip to content
Yeni Enpatika Logo

Enpatika

En Güncel Oyun ve Sistem Gereksinimleri Sitesi

  • Ana Sayfa
  • Gizlilik Politikası
  • Telif Hakları
  • İletişim
  • taraftar tv apk

Can a class have a static inner class in C++?

Why can’t inner classes have static members?

1 April 2022 Enpatika.com Genel

The reason why inner classes cannot have static members is because static members are usually instantiated when the program starts . However, an inner class depends on having an instance of its enclosing class in order to create it and then access it’s members.

Read more

Can a class have a static inner class in C++?

1 April 2022 Enpatika.com Genel

If you declared a class type definition as static anywhere (nested or not nested), you’d get a compiler warning and it will be stripped off. Classes cannot have storage class specifiers and static has been repurposed something different inside a class .

Read more
WordPress Theme: Gridbox by ThemeZee.