no matching function

The error is in the line

Galaxies[Galaxies.size()-1].AddSatilite(Galaxy(HubbleType,Redshift,TotalMass,StellarMassFraction));

saying that "error: no matching function for call to 'Galaxy::AddSatillite(Galaxy)'

What went wrong? Thanks.


1
2

Last edited on
Try this:
1
2
					Galaxy g(HubbleType,Redshift,TotalMass,StellarMassFraction);
					Galaxies[Galaxies.size()-1].AddSatilite(g);


The reference is not const hence you must provide a variable.
Topic archived. No new replies allowed.