c++ - How to initialize static const pointer in a class? -


<पूर्व> वर्ग विद्यालय {स्थैतिक const int * classcapacity; };

यह अभिव्यक्ति मेरी परीक्षा से है और इसे आरंभ करने की आवश्यकता है कि मैं यह कैसे कर सकता हूं?

आप इसे अपनी स्रोत फ़ाइल में क्लास के शरीर के बाहर प्रारंभ कर सकते हैं, जैसे कि आप किसी भी अन्य स्थिर सदस्य चर, अर्थात्:

  const int * स्कूल :: क्लास कैपसिटी (नया इंट (42));  

Comments

Popular posts from this blog

iphone - How do I make a UIPickerView in a UIActionSheet -

java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -

excel - Populate list via a bi-Condition -