initialization list c++

C++
struct S {
    int n;
    S(int); // constructor declaration
    S() : n(7) {} // constructor definition.
                  // ": n(7)" is the initializer list
};

S::S(int x) : n{x} {} // constructor definition. ": n{x}" is the initializer list

int main() {
    S s; // calls S::S()
    S s2(10); // calls S::S(int)
}int value1 = 1; // copy initialization
double value2(2.2); // direct initialization
char value3 {'c'}; // uniform initialization

Source

Also in C++: