|
|
my-cool-project
3.1.0
Starter template for C++ projects built with Bazel
|
A class for saying hello in multiple languages. More...
#include <greeter.h>
Public Member Functions | |
| Greeter (std::string name) | |
| Constructs a new Greeter object. | |
| std::string | greet (LanguageCode lang=LanguageCode::EN) const |
| Creates a localized greeting string. | |
Private Attributes | |
| std::string | name |
A class for saying hello in multiple languages.
The Greeter class allows you to create personalized greeting messages in different languages. It stores a name and provides a method to generate a greeting string localized to the specified language.
|
explicit |
| std::string greeter::Greeter::greet | ( | LanguageCode | lang = LanguageCode::EN | ) | const |
Creates a localized greeting string.
| lang | The language code to use for the greeting (default is English) |
Generates a greeting message in the specified language. If the language is not recognized, it defaults to English.
Supported greetings:
|
private |
The name of the person to greet