Answer the question
In order to leave comments, you need to log in
Data array as class member?
Hi all. I am making a program in Qt 5.3.1 with the compiler included in the Microsoft Visual studio 2013 Express Desktop . The task arose to build a schedule into the program, I came to the conclusion that it would be more logical to implement it as an array of numbers, initially available as a member of the class, but there were problems with the implementation. The following class compiles under MinGW , but becomes broken when compiled with VS 2013 . (studio is required to compile for 64 bit architecture)
class C
{
int x[4] = { 0, 1, 2, 3 };
public:
C(){}
};
Error 1 error C2536: C::C::x: cannot specify an explicit initializer for arrays
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question