# Classes in C++ A class groups data and behavior together. ```cpp #include #include class Greeter { public: explicit Greeter(std::string name) : name_(std::move(name)) { } void say_hello() const { std::cout << "Hello, " << name_ << std::endl; } private: std::string name_; }; int main() { Greeter greeter("Vix Note"); greeter.say_hello(); return 0; } ``` Classes are useful when data and behavior should live together.