action:create;
filename:MyClass.h
</YSFOML>
#ifndef MYCLASS_H
#define MYCLASS_H

#include <string>

class MyClass {
public:
    MyClass(std::string name);
    void greet();

private:
    std::string name_;
};

#endif // MYCLASS_H
<YSFOML>
action:create;
filename:MyClass.cpp
</YSFOML>
#include "MyClass.h"
#include <iostream>

MyClass::MyClass(std::string name) : name_(name) {
    std::cout << "MyClass object '" << name_ << "' created." << std::endl;
}

void MyClass::greet() {
    std::cout << "Hello from MyClass, my name is " << name_ << "!" << std::endl;
}
<YSFOML>
action:create;
filename:AnotherClass.h
</YSFOML>
#ifndef ANOTHERCLASS_H
#define ANOTHERCLASS_H

#include <string>

class AnotherClass {
public:
    AnotherClass(int id);
    void displayId();

private:
    int id_;
};

#endif // ANOTHERCLASS_H
<YSFOML>
action:create;
filename:AnotherClass.cpp
</YSFOML>
#include "AnotherClass.h"
#include <iostream>

AnotherClass::AnotherClass(int id) : id_(id) {
    std::cout << "AnotherClass object with ID " << id_ << " created." << std::endl;
}

void AnotherClass::displayId() {
    std::cout << "This is AnotherClass, my ID is: " << id_ << std::endl;
}
<YSFOML>
action:create;
filename:main.cpp
</YSFOML>
#include <iostream>
#include "MyClass.h"
#include "AnotherClass.h"

int main() {
    std::cout << "Starting C++ project demonstration with YSFOML-created files." << std::endl;

    // Create an object of MyClass
    MyClass obj1("Alice");
    obj1.greet();

    // Create another object of MyClass
    MyClass obj2("Bob");
    obj2.greet();

    // Create an object of AnotherClass
    AnotherClass objA(101);
    objA.displayId();

    // Create another object of AnotherClass
    AnotherClass objB(202);
    objB.displayId();

    std::cout << "Demonstration complete." << std::endl;

    return 0;
}