1: class Test { 2: private: 3: float myArray[] = {1.0f, 2.0f, 3.0f, 4.0f}; 4: };
- Задачка по С++
-
Пытаюсь инициализировать массив. Почему я не могу вот так это сделать?
1: class Test { 2: private: 3: float myArray[] = {1.0f, 2.0f, 3.0f, 4.0f}; 4: };
![]() | You are viewing Log in Create a LiveJournal Account Learn more |
2009-10-26 12:45 am (UTC)
2009-10-26 06:36 pm (UTC)
2009-11-22 05:28 pm (UTC)
1: class Counter
2: {
3: private:
4: static int count;
5:
6: public:
7: static int getCount()
8: {
9: return count;
10: }
11:
12: };
13:
14: int Counter::count = 0;