0

What is the difference between using ( ) or { } when initializing a defined class. Sometimes even the compiler requires me to use { }. And I don't know very well why it is and what is achieved by using this and not the parentheses.

Example:

Class test(10);
Class test{10};
  • Related: [https://stackoverflow.com/questions/24953658/what-are-the-differences-between-c-like-constructor-and-uniform-initialization](https://stackoverflow.com/questions/24953658/what-are-the-differences-between-c-like-constructor-and-uniform-initialization) – drescherjm Feb 13 '22 at 00:03

0 Answers0