1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include<iostream>
 
using namespace std;
 
class demo
{
public:
	demo(){}
private:
	const int m_matrix[10][10];
};
 
int main()
{
	return 0;
}

error C2439: ‘demo::m_matrix’ : member could not be initialized
这可咋办啊?class里面,普通数组可以有,可const数组就真的不能有吗?

Tags: .
你好!除了代码,此处没有多少原创之物,皆为本人搜集、整理、总结之记录与心得,欢迎转载分享!转载时请尽量注明出处,将不胜感激。祝你健康、快乐!
Home

RFC: Request For Comments. Orz..

Name(required)
Mail (required),(will not be published)

RFC: Request For Comments. Orz..

Website(recommended)