Link to home
Start Free TrialLog in
Avatar of Júlio
JúlioFlag for Brazil

asked on

C++ cannot specify explicit initializer for arrays [VS Community 2013 Update 4]

Hello, How are you?

I have this error:

Error      1      error C2536: 'Address::Address::Enemys' : cannot specify explicit initializer for arrays

class Address{
public:
	static Address& Instance(){
		static Address addr;
		return addr;
	}
	const DWORD Enemys[64] = { 0 };
}

Open in new window


I was searching in Google, and it says this is a bug.


I'm using Visual Studio Community 2013 Update 4.

What i do? I need to use singleton.

Ty!
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Júlio

ASKER

hum,

Now other error:

Error      3      error C2070: 'unknown': illegal sizeof operand
7      IntelliSense: a nonstatic member reference must be relative to a specific object
Error      2      error C2597: illegal reference to non-static member 'Address::Enemys'      

i think will use a vector. This is given to many errors. Ty for your time jkr!

EDIT: yes, i just changed to vectors and it's working fine now