{"id":265103,"date":"2015-09-07T15:58:03","date_gmt":"2015-09-07T11:58:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=265103"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=265103","title":{"rendered":"\u0418\u0437\u0431\u0438\u0442\u0430\u044f \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u041a\u0430\u043a \u0448\u043a\u043e\u043b\u044c\u043d\u0438\u043a \u0431\u043e\u0442\u0430 \u043f\u0438\u0441\u0430\u043b"},"content":{"rendered":"<p>             \u041c\u043d\u0435 16 \u0438 \u044f \u0448\u043a\u043e\u043b\u044c\u043d\u0438\u043a. \u041d\u0435 \u0442\u0430\u043a \u0443\u0436 \u0434\u0430\u0432\u043d\u043e \u043c\u0435\u043d\u044f \u043f\u043e\u0441\u0435\u0442\u0438\u043b\u0430 \u0438\u0434\u0435\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u0442\u0430\u2026 \u041d\u0435\u0442, PHP-\u043f\u043e\u0434\u0435\u043b\u0438\u0435, \u0443\u043d\u044b\u043b\u043e \u0432\u0438\u0441\u044f\u0449\u0435\u0435 \u043d\u0430 \u043d\u0438\u043a\u043e\u043c\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435. \u0418 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442\u0447\u0438\u043a \u043d\u0430 \u0444\u0440\u0430\u0437\u044b \u0442\u0438\u043f\u0430 &quot;! \u041f\u043e\u0433\u043e\u0434\u0430&quot;.<\/p>\n<p>  \u0411\u043e\u0442 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u00ab\u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043a\u0430\u00bb \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f. \u0423\u0436\u0430\u0441\u043d\u043e, \u043f\u0440\u0430\u0432\u0434\u0430? \u041d\u043e \u043c\u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0443\u0437\u043d\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043e\u0448\u0438\u0431\u043a\u0438, \u0432\u0435\u0434\u044c \u044f \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \u043a\u043e\u043c\u0443-\u043b\u0438\u0431\u043e, \u0432 \u0448\u043a\u043e\u043b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0441\u043a\u0430\u043b\u044c. \u0418\u0442\u0430\u043a, \u0441\u043b\u0435\u0434\u0443\u044f \u043d\u0435\u043d\u0430\u0432\u0438\u0434\u0438\u043c\u043e\u043c\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0447\u0438\u0441\u0442\u043e\u043c\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u043e\u043c\u0443 \u043f\u043e\u0434\u0445\u043e\u0434\u0443 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0430 C++.<\/p>\n<p>  \u0417\u0430\u0434\u0443\u043c\u043a\u0430 \u0442\u0430\u043a\u043e\u0432\u0430.<a name=\"habracut\"><\/a> \u0411\u043e\u0442 \u0431\u0435\u0440\u0435\u0442 \u0444\u0440\u0430\u0437\u0443 \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u0432\u044b\u0447\u043b\u0435\u043d\u044f\u0435\u0442 \u0441\u043b\u043e\u0432\u0430, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044e, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c\u0443 \u0432 \u0444\u0430\u0439\u043b\u0435 \u00abMemory.txt\u00bb, \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u043b\u043e\u0432\u0443; \u0435\u0441\u043b\u0438 \u043d\u0438 \u043d\u0430 \u043e\u0434\u043d\u043e \u0441\u043b\u043e\u0432\u043e \u043e\u0442\u0432\u0435\u0442 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d, \u0442\u043e \u043e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0433\u043e\u0432\u043e\u0440\u0435\u043d\u043d\u0443\u044e \u0444\u0440\u0430\u0437\u0443 (\u043d\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e).<\/p>\n<p>  \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0432 \u0444\u0430\u0439\u043b\u0435 \u00abMemory.txt\u00bb \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<br \/>   \u0441\u043b\u043e\u0432\u043e=\u043e\u0442\u0432\u0435\u0442<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440:<br \/>   \u044f\u0431\u043b\u043e\u043a\u043e=\u044f\u0431\u043b\u043e\u043a\u0438 \u0432\u043a\u0443\u0441\u043d\u044b\u0435<\/p>\n<p>  Bot.h- \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u043e \u043d\u0435\u043c \u043f\u043e\u0437\u0436\u0435. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 Bot.cpp:<\/p>\n<pre><code class=\"cpp\">\/** \u0414\u0430\u043d\u0438\u0438\u043b \u0414\u0435\u043c\u0438\u0434\u043a\u043e, 2015 \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Cbot *\/ #include&quot;Bot.h&quot; <\/code><\/pre>\n<p>  \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0438\u043c\u044f \u0434\u043b\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0432 \u044d\u0442\u043e\u043c \u0436\u0435 \u0444\u0430\u0439\u043b\u0435:<\/p>\n<pre><code class=\"cpp\">\/\/\/\u0418\u043c\u044f \u0442\u0435\u043a\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430- \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u043e\u0442\u0430 const char *const MemoryPath=&quot;Memory.txt&quot;; <\/code><\/pre>\n<p>  \u00ab\u041e\u0441\u043d\u043e\u0432\u0430 \u043e\u0441\u043d\u043e\u0432\u00bb \u0431\u043e\u0442\u0430 \u2014 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0432\u044b\u0434\u0435\u043b\u044f\u044e\u0449\u0430\u044f \u0441\u043b\u043e\u0432\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u0442\u0440\u043e\u043a \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0430\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">const std::string *const GetWords(const std::string &amp;Word)<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">    \/\/\/\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0441\u043b\u043e\u0432 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435-\u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0432\u0441\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443...     int MaxIndex=0;     \/\/\/\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u043b\u043e\u0432\u0430 \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438     const std::string *const GetWords(const std::string &Word)     {         \/\/\/\u0420\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u0432 \u043a\u0443\u0447\u0435 \u043d\u0430 256 \u0441\u043b\u043e\u0432         std::string *const PtrWords=new std::string[256];         \/\/\/\u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u0438\u0434\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435         MaxIndex=0;         \/\/\/\u0424\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438\u0441\u043a\u043e\u043c\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0432 \u043f\u0440\u0435\u0434\u0438\u0434\u0443\u0449\u0438\u0445 \u0446\u0438\u043a\u043b\u0430\u0445         bool Fix=false;         \/\/\/\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b- \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u0441\u044f         for(int i=0; i&lt;Word.size(); ++i)         {             \/\/\/\u0421\u0438\u043c\u0432\u043e\u043b\u044b- \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0438 \u0441\u043b\u043e\u0432         if(Word[i]==' '||Word[i]=='.'||Word[i]==','||Word[i]=='!'||Word[i]=='?'||Word[i]=='='||Word[i]=='\/')             {                 \/\/\/\u041f\u0440\u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f, \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e \u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u0446\u0438\u043a\u043b                 Fix=true;                 continue;             }             \/\/\/\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u0438\u0434\u0443\u0449\u0438\u0445 \u0446\u0438\u043a\u043b\u0430\u0445 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c, \u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u043e\u0434\u043d\u0443 \u044f\u0447\u0435\u0439\u043a\u0443             if(Fix)             {                 Fix=false;                 ++MaxIndex;             }             PtrWords[MaxIndex]+=Word[i];         }         return PtrWords;     } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0438\u0449\u0435\u0442 \u0435\u0435 \u043f\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044e, \u0435\u0441\u043b\u0438 \u043e\u0442\u0432\u0435\u0442 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0443\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 &quot;&quot;. \u0425\u043e\u0447\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0441\u043b\u043e\u0432\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u0439, \u0442\u043e \u043e\u0442\u0432\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0441\u0447\u0438\u0442\u0430\u043d.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">const std::string GetAssociation(const std::string &amp;Word)<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">\/\/\/\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u044e     const std::string GetAssociation(const std::string &Word)     {         std::ifstream Memory(MemoryPath, std::ios::in);         if(!Memory)         {             std::ofstream NewMemory(MemoryPath);             NewMemory.close();             Memory.open(MemoryPath);             return &quot;&quot;;         }         while(!Memory.eof())         {             std::string Buffer=&quot;&quot;;             std::getline(Memory, Buffer);             if(Buffer.find(Word)!=-1)             {                 std::string Result[2];                 for(int i=0, Index=0; i&lt;Buffer.size(); ++i)                 {                     if(Buffer[i]=='=')                     {                         \/\/\/\u0421\u0438\u043c\u0432\u043e\u043b\u044b \u043f\u043e\u0441\u043b\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u043d\u0430\u043a\u0430 '=' \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e- \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f                         if(Index==1)                         {                             break;                         }                         ++Index;                         continue;                     }                     Result[Index]+=Buffer[i];                 }                 if(Result[0].find(Word)!=-1)                 {                     Memory.close();                     return Result[1];                 }             }         }         Memory.close();         return &quot;&quot;;     } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043c\u0435\u043b\u043e\u0447\u0438- \u0443\u0436\u0430\u0441\u043d\u043e\u0439 \u043f\u0430\u0440\u043e\u0434\u0438\u0438 \u043d\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435- \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u0439 \u043f\u0440\u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 &#8216;-&#8216;.<br \/>  \u041f\u0440\u0438\u043c\u0435\u0440:<br \/>   \u0417\u043b\u043e- \u044d\u0442\u043e \u0434\u043e\u0431\u0440\u043e \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442<br \/>   \u0412 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0438\u0434\u0435\u0442:<br \/>   \u0417\u043b\u043e= \u044d\u0442\u043e \u0434\u043e\u0431\u0440\u043e \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442<br \/>  \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0441\u043b\u043e\u0432\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e, \u043e\u0442\u0432\u0435\u0442 \u0437\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">void PutAssociation(const std::string &amp;Left, const std::string &amp;Right)<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">\/\/\/\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u044e     void PutAssociation(const std::string &Left, const std::string &Right)     {         std::ofstream Memory(MemoryPath, std::ios::app);         Memory&lt;&lt;Left&lt;&lt;'='&lt;&lt;Right&lt;&lt;std::endl;         Memory.close();     } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u043c\u043e\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u2014 \u0434\u043b\u044f \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0435\u0435 \u0432 \u0441\u0435\u0431\u044f \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u00abBot.h\u00bb. \u041f\u043e\u0437\u0432\u043e\u043b\u044e \u0441\u0435\u0431\u0435 \u0441\u043e\u0441\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0433\u0443\u0440\u0443:  <\/p>\n<blockquote><p> \u042d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u043e\u0432\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435\u043c. <br \/>   \u0414\u043e\u0441\u0442\u0443\u043f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0435\u0434\u0438\u043d\u0438\u0446\u044b<br \/>   \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 (\u0442. \u0435. \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u043c \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0430\u0439\u043b\u0435), <br \/>   \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f, \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u043a \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c.<br \/>   \u0421\u0442\u0438\u0432\u0435\u043d \u0421. \u0414\u044c\u044e\u0440\u0445\u0435\u0441\u0442, \u00abC++. \u0421\u0432\u044f\u0449\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f\u00bb  <\/p><\/blockquote>\n<p>  \u0412\u043e\u0442, \u0432\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">namespace<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">namespace {     \/\/\/\u0418\u043c\u044f \u0442\u0435\u043a\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430- \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u043e\u0442\u0430     const char *const MemoryPath=&quot;Memory.txt&quot;;     \/\/\/\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0441\u043b\u043e\u0432 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435     int MaxIndex=0;     \/\/\/\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u043b\u043e\u0432\u0430 \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438     const std::string *const GetWords(const std::string &Word)     {         \/\/\/\u0420\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u0430 256 \u0441\u043b\u043e\u0432         std::string *const PtrWords=new std::string[256];         \/\/\/\u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u0438\u0434\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435         MaxIndex=0;         \/\/\/\u0424\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438\u0441\u043a\u043e\u043c\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0432 \u043f\u0440\u0435\u0434\u0438\u0434\u0443\u0449\u0438\u0445 \u0446\u0438\u043a\u043b\u0430\u0445         bool Fix=false;         \/\/\/\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b- \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u0441\u044f         for(int i=0; i&lt;Word.size(); ++i)         {             \/\/\/\u0421\u0438\u043c\u0432\u043e\u043b\u044b- \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0438 \u0441\u043b\u043e\u0432             if(Word[i]==' '||Word[i]=='.'||Word[i]==','||Word[i]=='!'||Word[i]=='?'||Word[i]=='='||Word[i]=='\/')             {                 \/\/\/\u041f\u0440\u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f, \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e \u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u0446\u0438\u043a\u043b                 Fix=true;                 continue;             }             \/\/\/\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u0438\u0434\u0443\u0449\u0438\u0445 \u0446\u0438\u043a\u043b\u0430\u0445 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c, \u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u043e\u0434\u043d\u0443 \u044f\u0447\u0435\u0439\u043a\u0443             if(Fix)             {                 Fix=false;                 ++MaxIndex;             }             PtrWords[MaxIndex]+=Word[i];         }         return PtrWords;     }          \/\/\/\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u044e     void PutAssociation(const std::string &Left, const std::string &Right)     {         std::ofstream Memory(MemoryPath, std::ios::app);         Memory&lt;&lt;Left&lt;&lt;'='&lt;&lt;Right&lt;&lt;std::endl;         Memory.close();     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043c\u0438\u0440\u043e\u043c, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d, \u043d\u043e \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0444\u0440\u0430\u0437\u0443, \u0432\u044b\u0447\u043b\u0435\u043d\u044f\u0435\u0442 \u0441\u043b\u043e\u0432\u0430, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u0438 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443, \u043f\u0440\u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0440\u0430\u0432\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u044e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">const std::string GetFullAssociation(const std::string &amp;Word)<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">\/\/\/\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u0438 \u043f\u043e \u0432\u0441\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u0444\u0440\u0430\u0437\u044b const std::string GetFullAssociation(const std::string &Word) {     const std::string *const Words=GetWords(Word);     std::string Result=&quot;&quot;;     for(int i=0; i&lt;=MaxIndex; ++i)     {         const std::string Buffer=GetAssociation(Words[i]);         if(Buffer!=&quot;&quot;)         {             Result+=Buffer+' ';         }     }     delete[] Words;     if(Word.find('-')!=-1)     {         std::string NewAssociations[2];         for(int i=0, Index=0; i&lt;Word.size(); ++i)         {             if(Word[i]=='-')             {                 if(Index==1)                 {                     break;                 }                 ++Index;                 continue;             }             if(Word[i]=='=')             {                 continue;             }             NewAssociations[Index]+=Word[i];         }         PutAssociation(NewAssociations[0], NewAssociations[1]);     }     return Result; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0432\u0435\u0434\u0435\u043c \u0438\u0442\u043e\u0433 \u2014 \u0444\u0430\u0439\u043b \u00abBot.cpp\u00bb \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Bot.cpp<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">\/** \u0414\u0430\u043d\u0438\u0438\u043b \u0414\u0435\u043c\u0438\u0434\u043a\u043e, 2015 \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Cbot *\/ #include&quot;Bot.h&quot; \/\/\/\u0410\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u044d\u0442\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 namespace {     \/\/\/\u0418\u043c\u044f \u0442\u0435\u043a\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430- \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u043e\u0442\u0430     const char *const MemoryPath=&quot;Memory.txt&quot;;     \/\/\/\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0441\u043b\u043e\u0432 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435     int MaxIndex=0;     \/\/\/\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u043b\u043e\u0432\u0430 \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438     const std::string *const GetWords(const std::string &Word)     {         \/\/\/\u0420\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u0430 256 \u0441\u043b\u043e\u0432         std::string *const PtrWords=new std::string[256];         \/\/\/\u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u0438\u0434\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435         MaxIndex=0;         \/\/\/\u0424\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438\u0441\u043a\u043e\u043c\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0432 \u043f\u0440\u0435\u0434\u0438\u0434\u0443\u0449\u0438\u0445 \u0446\u0438\u043a\u043b\u0430\u0445         bool Fix=false;         \/\/\/\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b- \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u0441\u044f         for(int i=0; i&lt;Word.size(); ++i)         {             \/\/\/\u0421\u0438\u043c\u0432\u043e\u043b\u044b- \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0438 \u0441\u043b\u043e\u0432             if(Word[i]==' '||Word[i]=='.'||Word[i]==','||Word[i]=='!'||Word[i]=='?'||Word[i]=='='||Word[i]=='\/')             {                 \/\/\/\u041f\u0440\u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f, \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e \u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u0446\u0438\u043a\u043b                 Fix=true;                 continue;             }             \/\/\/\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u0438\u0434\u0443\u0449\u0438\u0445 \u0446\u0438\u043a\u043b\u0430\u0445 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c, \u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u043e\u0434\u043d\u0443 \u044f\u0447\u0435\u0439\u043a\u0443             if(Fix)             {                 Fix=false;                 ++MaxIndex;             }             PtrWords[MaxIndex]+=Word[i];         }         return PtrWords;     }     \/\/\/\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u044e     const std::string GetAssociation(const std::string &Word)     {         std::ifstream Memory(MemoryPath, std::ios::in);         if(!Memory)         {             std::ofstream NewMemory(MemoryPath);             NewMemory.close();             Memory.open(MemoryPath);             return &quot;&quot;;         }         while(!Memory.eof())         {             std::string Buffer=&quot;&quot;;             std::getline(Memory, Buffer);             if(Buffer.find(Word)!=-1)             {                 std::string Result[2];                 for(int i=0, Index=0; i&lt;Buffer.size(); ++i)                 {                     if(Buffer[i]=='=')                     {                         \/\/\/\u0421\u0438\u043c\u0432\u043e\u043b\u044b \u043f\u043e\u0441\u043b\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u043d\u0430\u043a\u0430 '=' \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e- \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f                         if(Index==1)                         {                             break;                         }                         ++Index;                         continue;                     }                     Result[Index]+=Buffer[i];                 }                 if(Result[0].find(Word)!=-1)                 {                     Memory.close();                     return Result[1];                 }             }         }         Memory.close();         return &quot;&quot;;     }     \/\/\/\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u044e     void PutAssociation(const std::string &Left, const std::string &Right)     {         std::ofstream Memory(MemoryPath, std::ios::app);         Memory&lt;&lt;Left&lt;&lt;'='&lt;&lt;Right&lt;&lt;std::endl;         Memory.close();     } } \/\/\/\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u0438 \u043f\u043e \u0432\u0441\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u0444\u0440\u0430\u0437\u044b const std::string GetFullAssociation(const std::string &Word) {     const std::string *const Words=GetWords(Word);     std::string Result=&quot;&quot;;     for(int i=0; i&lt;=MaxIndex; ++i)     {         const std::string Buffer=GetAssociation(Words[i]);         if(Buffer!=&quot;&quot;)         {             Result+=Buffer+' ';         }     }     delete[] Words;     if(Word.find('-')!=-1)     {         std::string NewAssociations[2];         for(int i=0, Index=0; i&lt;Word.size(); ++i)         {             if(Word[i]=='-')             {                 if(Index==1)                 {                     break;                 }                 ++Index;                 continue;             }             if(Word[i]=='=')             {                 continue;             }             NewAssociations[Index]+=Word[i];         }         PutAssociation(NewAssociations[0], NewAssociations[1]);     }     return Result; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0435 \u0441 \u0444\u0430\u0439\u043b\u043e\u043c \u00abBot.cpp\u00bb \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438, \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u00abBot.h\u00bb:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Bot.h<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#ifndef BOT #define BOT \/\/\/\u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043b\u0438 \u0443\u0436\u0435 iostream #ifndef _GLIBCXX_IOSTREAM #include&lt;iostream&gt; #endif            \/\/_GLIBCXX_IOSTREAM \/\/\/\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c fstream #ifndef _GLIBCXX_FSTREAM #include&lt;fstream&gt; #endif           \/\/_GLIBCXX_FSTREAM \/\/\/\u041d\u0430\u0448\u0430 \u0443\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u0441 \u043c\u0438\u0440\u043e\u043c extern const std::string GetFullAssociation(const std::string&); #endif          \/\/BOT <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438, \u0434\u0435\u043b\u043e \u0437\u0430 \u043c\u0430\u043b\u043e\u0441\u0442\u044c\u044e \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 main(). \u041e\u043d\u0430 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 Cbot.cpp. Cbot \u2014 \u0437\u0432\u0443\u0447\u0438\u0442 \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e, \u0432\u0435\u0434\u044c \u043f\u0440\u0430\u0432\u0434\u0430?<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Cbot.cpp<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#include&quot;Bot.h&quot; int main() {     \/\/\/\u0424\u0430\u0439\u043b \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0438 866 OEM (\u0440\u0443\u0441\u0441\u043a\u0430\u044f), \u0444\u0430\u0439\u043b &quot;Memory.txt&quot; \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 \u043d\u0435\u0439 \u0436\u0435     setlocale(LC_ALL, &quot;.866&quot;);     std::wcout&lt;&lt;&quot;Cbot 2.0\\n\u0410\u0432\u0442\u043e\u0440: \u0414\u0430\u043d\u0438\u0438\u043b \u0414\u0435\u043c\u0438\u0434\u043a\u043e\\nE-Mail: DDemidko1@gmail.com&quot;&lt;&lt;std::endl;     while(true)     {         std::wcout&lt;&lt;&quot;\u042f: &quot;;         std::string Buffer=&quot;&quot;;         std::getline(std::cin, Buffer);         const std::string Association=GetFullAssociation(Buffer);         \/**         \u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f? \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0432\u0435\u0434\u044c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0440\u043e\u0449\u0435-          if(Association==&quot;&quot;)         {             Association=&quot;Bot: \u041d\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u0430 \u043a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c!&quot;;         }         std::cout&lt;&lt;Association&lt;&lt;std::endl;          \u041d\u043e \u043c\u044b \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 866 OEM-  \u0441 \u043d\u0435\u0439 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u0443 std::string \u0441\u0442\u0440\u043e\u043a\u0443 \u043a\u0438\u0440\u0438\u043b\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043f\u0440\u044f\u043c\u043e \u0438\u0437 \u043a\u043e\u0434\u0430-         \u0442\u0430\u043a\u043e\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e (\u0441 866 OEM) \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0432\u0432\u043e\u0434\u0435 \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438.         *\/         if(Association==&quot;&quot;)         {             std::wcout&lt;&lt;&quot;Bot: \u041d\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u0430 \u043a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c!&quot;&lt;&lt;std::endl;         }         else         {             std::cout&lt;&lt;&quot;Bot: &quot;&lt;&lt;Association&lt;&lt;std::endl;         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u0441\u0435, \u0431\u043e\u0442 \u0433\u043e\u0442\u043e\u0432, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u043c\u0435\u0441\u0442\u0435, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c Cbot.exe, <b>\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b Memory.txt \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 OEM 866<\/b> \u0438 \u043a\u043b\u0430\u0434\u0435\u043c \u0432 \u043e\u0434\u043d\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439. \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443: <a href=\"http:\/\/spaces.ru\/files\/?r=main\/view&#038;Read=58688510\">spaces.ru\/files\/?r=main\/view&#038;Read=58688510<\/a><\/p>\n<p>  \u041e\u0436\u0438\u0434\u0430\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043a\u0440\u0438\u0442\u0438\u043a\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043a\u043e\u0434\u0435.             <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/266351\/\"> http:\/\/habrahabr.ru\/post\/266351\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>             \u041c\u043d\u0435 16 \u0438 \u044f \u0448\u043a\u043e\u043b\u044c\u043d\u0438\u043a. \u041d\u0435 \u0442\u0430\u043a \u0443\u0436 \u0434\u0430\u0432\u043d\u043e \u043c\u0435\u043d\u044f \u043f\u043e\u0441\u0435\u0442\u0438\u043b\u0430 \u0438\u0434\u0435\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u0442\u0430\u2026 \u041d\u0435\u0442, PHP-\u043f\u043e\u0434\u0435\u043b\u0438\u0435, \u0443\u043d\u044b\u043b\u043e \u0432\u0438\u0441\u044f\u0449\u0435\u0435 \u043d\u0430 \u043d\u0438\u043a\u043e\u043c\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435. \u0418 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442\u0447\u0438\u043a \u043d\u0430 \u0444\u0440\u0430\u0437\u044b \u0442\u0438\u043f\u0430 &quot;! \u041f\u043e\u0433\u043e\u0434\u0430&quot;.<\/p>\n<p>  \u0411\u043e\u0442 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u00ab\u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043a\u0430\u00bb \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f. \u0423\u0436\u0430\u0441\u043d\u043e, \u043f\u0440\u0430\u0432\u0434\u0430? \u041d\u043e \u043c\u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0443\u0437\u043d\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043e\u0448\u0438\u0431\u043a\u0438, \u0432\u0435\u0434\u044c \u044f \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \u043a\u043e\u043c\u0443-\u043b\u0438\u0431\u043e, \u0432 \u0448\u043a\u043e\u043b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0441\u043a\u0430\u043b\u044c. \u0418\u0442\u0430\u043a, \u0441\u043b\u0435\u0434\u0443\u044f \u043d\u0435\u043d\u0430\u0432\u0438\u0434\u0438\u043c\u043e\u043c\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0447\u0438\u0441\u0442\u043e\u043c\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u043e\u043c\u0443 \u043f\u043e\u0434\u0445\u043e\u0434\u0443 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0430 C++.<\/p>\n<p>  \u0417\u0430\u0434\u0443\u043c\u043a\u0430 \u0442\u0430\u043a\u043e\u0432\u0430.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-265103","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/265103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=265103"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/265103\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=265103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=265103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=265103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}