There's no "best" way. For scalar types (like int
in your example) both forms have exactly the same effect.
The int a(0)
syntax for non-class types was introduced to support uniform direct-initialization syntax for class and non-class types, which is very useful in type-independent (template) code.
In non-template code the int a(0)
is not needed. It is completely up to you whether you want to use the int a(0)
syntax, or prefer to stick to more traditional int a = 0
syntax. Both do the same thing. The latter is more readable, in my opinion.