0
class myClass {};

Simple question, what is the difference between myClass t(); and myClass t;? If any?

Thanks.

  • 1
    Google "Most vexing parse". The first one is a function prototype, the second one creates an object of type `myClass`. – Bathsheba Jun 02 '20 at 21:09
  • 1
    All the difference in the world. The first one is a function prototype and the second one is a variable declaration. – john Jun 02 '20 at 21:12

0 Answers0