MyModernCppStarter/source/greeter.cpp
Lars Melchior 92adf2db25
Create version header and update readme (#44)
* 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
2020-06-03 16:25:44 +02:00

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 + "!";
}
}