samedi 1 avril 2017

What is the difference between these three ways to initialise static variables?

Those 2 syntaxes work. What is the difference between them?

class MyClass
{
  const static int myInt1_ {20};
  const static int myInt2_ = 20;
}

Also, why is it not possible to do const static int myInt3_ (20)?

Aucun commentaire:

Enregistrer un commentaire