#include #include using namespace std; class Stock { public: void buy() { cout << "Stock [ Name: " + name + ", Quantity: " + std::to_string(quantity) + " ] bought" << endl; } void sell() { cout << "Stock [ Name: " + name + ", Quantity: " + std::to_string(quantity) + " ] sold" << endl; } private: string name = "test"; int quantity = 10; };