Quantcast
Channel: User HolyBlackCat - Stack Overflow
Viewing all articles
Browse latest Browse all 1287

Comment by HolyBlackCat on Define constant within a class

$
0
0
Yes, static is necessary, otherwise a copy of the constant would be stored in every class instance (which wastes memory), and it would no longer be a compile-time constant (so wouldn't work as an array size).

Viewing all articles
Browse latest Browse all 1287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>