1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-08-30 13:41:13 +02:00
This commit is contained in:
Lars Melchior 2020-04-11 12:31:08 +02:00
commit c94580f25c
15 changed files with 711 additions and 0 deletions

18
source/greeter.cpp Normal file
View file

@ -0,0 +1,18 @@
#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 + "!";
}
}