Static initalization of global variable?

Rick Mann rmann-d-lang at latencyzero.com
Sat Mar 3 16:14:14 PST 2007


I keep getting bitten by things that seem obvious. I'm trying to do this:

import ...CFString;

CFStringRef kHIAboutBoxNameKey;

static
{
	kHIAboutBoxNameKey              =	CFSTR("HIAboutBoxName");
}


But GDC 0.22 complains with: "no identifier for declarator kHIAboutBoxNameKey".

I don't even know what this is telling me. I basically want a variable to hold a (constant) value that other code can use. In this case, CFStringRef is a pointer to a struct type declared in CFString. What must I do?

TIA,
Rick



More information about the Digitalmars-d-learn mailing list