mirror of
https://github.com/TheLartians/ModernCppStarter.git
synced 2025-08-30 21:51:12 +02:00
* add note on github pages * add version information to standalone. closes #35. * update version info * move includes into project directory and create version header * fix style * add comment for version header location
19 lines
457 B
C++
19 lines
457 B
C++
#include <greeter/greeter.h>
|
|
|
|
using namespace greeter;
|
|
|
|
Greeter::Greeter(std::string _name) : name(_name) {}
|
|
|
|
std::string Greeter::greet(LanguageCode lang) const {
|
|
switch (lang) {
|
|
default:
|
|
case LanguageCode::EN:
|
|
return "Hello, " + name + "!";
|
|
case LanguageCode::DE:
|
|
return "Hallo " + name + "!";
|
|
case LanguageCode::ES:
|
|
return "¡Hola " + name + "!";
|
|
case LanguageCode::FR:
|
|
return "Bonjour " + name + "!";
|
|
}
|
|
}
|