1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-08-30 21:51:12 +02:00
ModernCppStarter/source/greeter.cpp
Lars Melchior c94580f25c init
2020-04-11 12:31:08 +02:00

18 lines
436 B
C++

#include <greeter.h>
using namespace greeter;
Greeter::Greeter(std::string _name) : name(_name) {}
std::string Greeter::greet(LanguageCode lang) const {
switch (lang) {
case LanguageCode::EN:
return "Hello, " + name + "!";
case LanguageCode::DE:
return "Hallo " + name + "!";
case LanguageCode::ES:
return "¡Hola " + name + "!";
case LanguageCode::FR:
return "Bonjour " + name + "!";
}
}