[Solved] Functions in Structures ? C++


Options() is your default constructor. Structs and classes are equivalent in the sense that they can have methods and constructors. What’s after : is the initialisation list for Options(). It tells you that in your default constructor for Options():

  • num_particles is initialised to NUM_PARTICLES
  • ule_lbp is initialised to false
  • infile initialised to an empty string
  • outfile initialised to an empty string

Similar line of reasoning applies for State_.

solved Functions in Structures ? C++