Чрезмерное увлечение ООП до добра не доведет...

    Date: 03/12/09 (Code WTF)    Keywords: no keywords

     .h:

    #ifndef __TIMESTEPCONSTANT_H__
    #define __TIMESTEPCONSTANT_H__
     
    #include "../Common/stdex/singleton.h"
     
    class CTimeStepConstant
    {
    public:
    DWORD GetTimeStepSeconds();
    };
     
    typedef stdex::singleton< CTimeStepConstant > TimeStep;
     
    #endif // __TIMESTEPCONSTANT_H__

    .cpp:
    #include "stdafx.h"
    #include "TimeStepConstant.h"
     
    namespace
    {
    const DWORD g_dwTimeStepSeconds = 60;
    }
     
    DWORD CTimeStepConstant::GetTimeStepSeconds()
    {
    return g_dwTimeStepSeconds;
    }

    Source: http://community.livejournal.com/code_wtf/161003.html

« Мелочь конечно... || javascript »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home