====================[ Build | untitled1 | Debug ]===============================
"C:\Program Files\JetBrains\CLion 2024.2.2\bin\cmake\win\x64\bin\cmake.exe" --build C:\Users\sagar\CLionProjects\untitled1\cmake-build-debug --target untitled1 -j 18
[1/2] Building CXX object CMakeFiles/untitled1.dir/Simulation.cpp.obj
FAILED: CMakeFiles/untitled1.dir/Simulation.cpp.obj 
C:\PROGRA~1\JETBRA~1\CLION2~1.2\bin\mingw\bin\G__~1.EXE   -g -std=gnu++20 -fdiagnostics-color=always -MD -MT CMakeFiles/untitled1.dir/Simulation.cpp.obj -MF CMakeFiles\untitled1.dir\Simulation.cpp.obj.d -o CMakeFiles/untitled1.dir/Simulation.cpp.obj -c C:/Users/sagar/CLionProjects/untitled1/Simulation.cpp
In file included from C:/Users/sagar/CLionProjects/untitled1/DarkMatter.h:4,
                 from C:/Users/sagar/CLionProjects/untitled1/Galaxy.h:5,
                 from C:/Users/sagar/CLionProjects/untitled1/Simulation.h:3,
                 from C:/Users/sagar/CLionProjects/untitled1/Simulation.cpp:1:
C:/Users/sagar/CLionProjects/untitled1/Star.h:9:28: error: 'Galaxy' has not been declared
    9 |     void update(double dt, Galaxy& galaxy);
      |                            ^~~~~~
C:/Users/sagar/CLionProjects/untitled1/DarkMatter.h:11:28: error: 'Galaxy' has not been declared
   11 |     void update(double dt, Galaxy& galaxy);
      |                            ^~~~~~
C:/Users/sagar/CLionProjects/untitled1/Simulation.cpp: In member function 'void Simulation::integrate(double)':
C:/Users/sagar/CLionProjects/untitled1/Simulation.cpp:23:25: error: cannot convert 'Galaxy' to 'int&'
   23 |         star.update(dt, galaxy);
      |                         ^~~~~~
      |                         |
      |                         Galaxy
C:/Users/sagar/CLionProjects/untitled1/Star.h:9:36: note:   initializing argument 2 of 'void Star::update(double, int&)'
    9 |     void update(double dt, Galaxy& galaxy);
      |                            ~~~~~~~~^~~~~~
C:/Users/sagar/CLionProjects/untitled1/Simulation.cpp:28:34: error: cannot convert 'Galaxy' to 'int&'
   28 |     galaxy.darkMatter.update(dt, galaxy);
      |                                  ^~~~~~
      |                                  |
      |                                  Galaxy
C:/Users/sagar/CLionProjects/untitled1/DarkMatter.h:11:36: note:   initializing argument 2 of 'void DarkMatter::update(double, int&)'
   11 |     void update(double dt, Galaxy& galaxy);
      |                            ~~~~~~~~^~~~~~
ninja: build stopped: subcommand failed.

#ifndef GALAXY_H
#define GALAXY_H
#include <vector>

#include "DarkMatter.h"
class Star;
class Gas;
class DarkMatter;
class Galaxy {
public:
    Galaxy();
    ~Galaxy();

    void initialize();
    void update(double dt);

    // Galaxy properties
    double centralBlackHoleMass;
    double diskRadius;
    double spiralArmPitchAngle;
    std::vector<Star> stars;
    std::vector<Gas> gas;
    DarkMatter darkMatter;

private:
    // Galaxy structure
    std::vector<double> diskDensityProfile;
    std::vector<double> spiralArmDensityProfile;
};

#endif  // GALAXY_H

#ifndef STAR_H
#define STAR_H

class Star {
public:
    Star(double mass, double position[3], double velocity[3]);
    ~Star();

    void update(double dt, Galaxy& galaxy);
    void evolve();

    // Star properties
    double mass;
    double position[3];
    double velocity[3];
    double age;
    double metallicity;

private:
    // Star evolution
    double mainSequenceLifetime;
    double redGiantLifetime;
    double whiteDwarfLifetime;
};

#endif  // STAR_H

#ifndef GAS_H
#define GAS_H

class Gas {
public:
    Gas(double density, double temperature, double position[3]);
    ~Gas();

    void update(double dt, Galaxy& galaxy);
    void cool();
    void heat();

    // Gas properties
    double density;
    double temperature;
    double position[3];
    double velocity[3];

private:
    // Gas cooling and heating
    double coolingRate;
    double heatingRate;
};

#endif  // GAS_H

#ifndef DARKMATTER_H
#define DARKMATTER_H
#include <vector>
#include "Star.h"
#include "Galaxy.h"
class DarkMatter {
public:
    DarkMatter(double mass, double position[3]);
    ~DarkMatter();

    void update(double dt, Galaxy& galaxy);
    void interactWithStars(std::vector<Star>& stars);

    // Dark matter properties
    double mass;
    double position[3];
    double velocity[3];

private:
    // Dark matter interactions
    double interactionRadius;
};

#endif

#ifndef SIMULATION_H
#define SIMULATION_H
#include "Galaxy.h"
class Galaxy;
class Simulation {
public:
    Simulation(Galaxy& galaxy);
    ~Simulation();

    void run(double totalTime, double dt);

    // Simulation properties
    Galaxy galaxy;
    double currentTime;
    double timeStep;

private:
    // Simulation loop
    void integrate(double dt);
    Galaxy galaxy_;
    void output();
};

#endif  // SIMULATION_H

#include "Simulation.h"
#include "Galaxy.h"
#include <iostream>

#include "DarkMatter.h"
#include "Gas.h"
#include "Star.h"

void Simulation::run(double totalTime, double dt) {
    currentTime = 0.0;
    timeStep = dt;

    while (currentTime < totalTime) {
        integrate(dt);
        output();
        currentTime += dt;
    }
}

void Simulation::integrate(double dt) {
    galaxy.update(dt);
    for (auto& star : galaxy.stars) {
        star.update(dt, galaxy);
    }
    for (auto& gas : galaxy.gas) {
        gas.update(dt, galaxy);
    }
    galaxy.darkMatter.update(dt, galaxy);
}

void Simulation::output() {
    // Output galaxy properties, star positions, gas density, etc.
    std::cout << "Time: " << currentTime << std::endl;
    std::cout << "Galaxy properties: " << galaxy.diskRadius << ", " << galaxy.centralBlackHoleMass << std::endl;
    // ...
}

fix the codes for me!