a{3.14}
wirft einen Fehler, weil Sie nicht die type angegeben haben,
int a(3.14) // initial value: 3.14, you could use {} also intead of()
gewohnt, weil Sie sagten, es ist ganzzahlig ..
Ich werde Ihnen eine Erklärung geben, und ich hoffe, es wird Ihnen klarer sein:
// Bog-standard declaration.
int a;
// WRONG - this declares a function.
int a();
// Bog-standard declaration, with constructor arguments.
// (*)
int a(1, 2, 3... args);
// Bog-standard declaration, with *one* constructor argument
// (and only if there's a matching, _non-explicit_ constructor).
// (**)
int a = 1;
// Uses aggregate initialisation, inherited from C.
// Not always possible; depends on layout of T.
int a = {1, 2, 3, 4, 5, 6};
// Invoking C++0x initializer-list constructor.
int a{1, 2, 3, 4, 5, 6};
// This is actually two things.
// First you create a [nameless] rvalue with three
// constructor arguments (*), then you copy-construct
// a [named] T from it (**).
int a = T(1, 2, 3);
// Heap allocation, the result of which gets stored
// in a pointer.
int* a = new T(1, 2, 3);
// Heap allocation without constructor arguments.
int* a = new T;
nachschlagen nützlich sein [Umwandlungen Verengung] (http://en.cppreference.com/w/cpp/language/list_initialization#Narrowing_conversions) –