Page 4 of 6

Re: Birthdays

PostPosted: 14 Mar 2016, 22:53
by linuxwolf
Thanks guys!! :D >--I

Nice Birthday programming Jedi. :wink:

Re: Birthdays

PostPosted: 14 Mar 2016, 23:01
by DoomJedi
You're welcome, pal :D :D :D

Re: Birthdays

PostPosted: 15 Mar 2016, 11:56
by linuxwolf
:D

Code: Select all
#include <algorithm>
#include <iostream>
#include <vector>

namespace Sfx
{
   enum e
   {
      extinguished,
      blow,
   };

   void play(enum e x)
   {
      std::cout << "sound effect: " << x << std::endl;
   }
};

class Candle
{
public:
   typedef std::vector<Candle> Vec;

   bool burning;

   Candle() : burning(true)
   {
   }

   void extinguish(void)
   {
      if (burning)
      {
         Sfx::play(Sfx::extinguished);
         burning = false;
      }
   }
};

typedef Candle::Vec Cake;

void extinguishCandle(Candle &candle)
{
   candle.extinguish();
}

class LinuxWolf
{
public:
   int age;

   LinuxWolf() : age(34)
   {
   }

   void blow(Cake &cake)
   {
      Sfx::play(Sfx::blow);
      std::for_each(cake.begin(), cake.end(), extinguishCandle);
   }
};

int main(int argc, char **argv)
{
   LinuxWolf linuxWolf;

   Cake cake(linuxWolf.age);

   linuxWolf.blow(cake);

   const std::string s("I'm glad you handled the candles");
   return std::accumulate(s.begin(), s.end(), 0);
}

Re: Birthdays

PostPosted: 15 Mar 2016, 12:13
by DoomJedi
Return "I'm glad you handled the candles" :)

Re: Birthdays

PostPosted: 23 May 2016, 08:37
by DoomJedi
Happy Birthday, pwojo588 ! }8O--
>--I >--I

Re: Birthdays

PostPosted: 24 May 2016, 12:15
by Officer-Michael John
Happy birthday retrospectively pwojo88!

Re: Birthdays

PostPosted: 22 Nov 2016, 15:48
by Atina
Happy Birthday DoomJedi ! ^^ Image

Re: Birthdays

PostPosted: 22 Nov 2016, 18:23
by DoomJedi
Thank you :)
:beer:

(I--I) >0<

Re: Birthdays

PostPosted: 23 Nov 2016, 15:09
by Officer-Michael John
Happy Brithday later too DoomJedi! :)

Re: Birthdays

PostPosted: 24 Nov 2016, 09:43
by DoomJedi
Thank you :)

Re: Birthdays

PostPosted: 25 Nov 2016, 00:00
by Officer-Michael John
You‘re welcome! :)

Re: Birthdays

PostPosted: 28 Nov 2016, 23:06
by Lozer_42
a happy birthday to WLHack

Re: Birthdays

PostPosted: 29 Nov 2016, 10:16
by Officer-Michael John
Happy Brithday later too WLHack! :)

Re: Birthdays

PostPosted: 30 Nov 2016, 18:55
by Officer-Michael John
Happy Brithday Thomas Weiling (Wolfer King) and OMJ (Me)!

Re: Birthdays

PostPosted: 14 Mar 2017, 09:22
by DoomJedi
Happy Birthday LinuxWolf :)
:beer: :beer: :beer:

Best coder in the whoooooole world *comp*
Best wishes, health, career, love, happyness...and alot of great mods :)