Skip to content

Instantly share code, notes, and snippets.

@acoster
Created December 8, 2012 23:26
Show Gist options
  • Save acoster/4242508 to your computer and use it in GitHub Desktop.
Save acoster/4242508 to your computer and use it in GitHub Desktop.
Nerdiest Birthday Message ever.
#include <string>
#include <algorithm>
#include <iostream>
#define __A "!zbei"
#define __B "zqqbI"
#define __C "\"mmjX"
#define __D "usjc!"
class App
{
public:
App(const void *p)
: mStrMsg(static_cast<const char *>(p))
{}
~App()
{
auto f = [](char c) -> char { return c -1; };
std::for_each(mStrMsg.rbegin(), mStrMsg.rend(), [&](char c) { std::cout << f(c); });
std::cout << std::endl;
}
private:
std::string mStrMsg;
};
int main(int, char **)
{
App a(static_cast<const void *>(__C __A __D __B));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment