I\'m a long time Java user learning C++ with Qt and I\'m having a lot of trouble understanding how methods work. Right now, I\'m trying to figure out databases, and tried to
In support to the accepted answer.
From dcl.init#11:
An object whose initializer is an empty set of parentheses, i.e., (), shall be value-initialized.
[ Note: Since
()is not permitted by the syntax for initializer,X a();is not the declaration of an object of
class X, but the declaration of a function taking no argument and returning an X. The form()is permitted in certain other initialization contexts ([expr.new], [expr.type.conv], [class.base.init]). — end note ]