-2
struct Sale{
Sale () = default;//I got nothing about those cod
Sale(std::istream &input);
Sale(const std::string &s):book(s) {}
//and so on......
}

What did the second code mean? Is that mean that doing nothing ?Or we must write those default code to tell the compiler we made a default constructor which doing nothing. And what about the "= default" mean in the C++11?

1 Answers1

0

= default specifies compiler generted code for that function.

nitishagar
  • 9,038
  • 3
  • 28
  • 40