Top "Initializer" questions

Initializers are called to create a new instance of a particular type.

static constructors in C++? I need to initialize private static objects

I want to have a class with a private static data member (a vector that contains all the characters a-z). …

c++ static private initializer static-constructor
C++: constructor initializer for arrays

I'm having a brain cramp... how do I initialize an array of objects properly in C++? non-array example: struct Foo { …

c++ constructor initializer
Static class initializer in PHP

I have an helper class with some static functions. All the functions in the class require a ‘heavy’ initialization function …

php class static constructor initializer
How to initialize member-struct in initializer list of C++ class?

I have the following class definitions in c++: struct Foo { int x; char array[24]; short* y; }; class Bar { Bar(); int …

c++ list constructor struct initializer
C: warning: excess elements in array initializer; near initialization for ‘xxx' ; expects ‘char *’, but has type ‘int’

I've some warnings while trying to compile program in C language: 13:20: warning: excess elements in array initializer [enabled by default] 13:20: …

c arrays char initializer
Use of Initializers vs Constructors in Java

So I've been brushing up on my Java skills as of late and have found a few bits of functionality …

java constructor initializer static-initializer initialization-block
Initializer is inaccessable due to 'internal' protection level

I have some protocols LoginStrategy public protocol LoginStrategy { func login(_ viewController: UIViewController) func getUserInfo(withCompletionHandler completionHandler: @escaping (_ userInfo: [String: Any]?) …

ios swift frameworks access-modifiers initializer
Initializer does not override a designated initializer from its superclass

So I've just upgraded to Xcode 6.3 Beta 3 and a lot of error(s) are appearing relating to the following: Initializer …

ios swift uiviewcontroller initializer
CoreData: error: Failed to call designated initializer on NSManagedObject class

I have a little damn problem with CoreData. I want to insert a new Object, so I first have to …

objective-c core-data initializer
Why do I get an error about the initializer not being a constant?

I am using the following code. const int X_ORIGIN = 1233086; const int Y_ORIGIN = -4728071; const int Z_ORIGIN = 4085704; const …

c constants initializer