Take the 2-minute tour ×  i searched but could not find the
answer.  So I have my c++ constructor:  MyClass(string username
= "something");  note this is the only constructor I have.  in
my main, I do:  MyClass one(); MyClass two = MyClass();  are
these two expressions equivalent? is the compiler gonna call my
constructor with the default string, or is it gonna call the
default (empty) constructor?  What would change if I did have a
constructor MyClass(); ? I guess that would not compile, right?
share|improve this question MyClass one(); Refferred to as the
most Vexing parse Its not actually a declaration of the variable
one. But a forward declaration of a function called one. –  Loki
Astari Mar 19 '11 at 7:27  4 Answers 4  MyClass one();  This
declares a function one returning a MyClass object and taking no
arguments.  If you have both default constructor (of the form
MyClass()) and default argument constuctor (of the form
MyClass(string s = "string") ) which one would be called if you
don't pass any argume