mirror of
https://github.com/TheLartians/ModernCppStarter.git
synced 2025-08-30 13:41:13 +02:00
init
This commit is contained in:
commit
c94580f25c
15 changed files with 711 additions and 0 deletions
18
source/greeter.cpp
Normal file
18
source/greeter.cpp
Normal 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 + "!";
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue