Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 821 Bytes

File metadata and controls

27 lines (22 loc) · 821 Bytes

Braced array initialization {#example_braced_array_initialization}

int main()
{
    // The compiler automatically fills the remaining
    // fields with 0 thanks to braced initialization.
    int arr[5]{2, 3, 4};
}

Here is the transformed code:

int main()
{
  int arr[5] = {2, 3, 4, 0, 0};
  return 0;
}

Live view