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 toNUM_PARTICLES
ule_lbp
is initialised tofalse
infile
initialised to an empty stringoutfile
initialised to an empty string
Similar line of reasoning applies for State_
.
solved Functions in Structures ? C++