{"id":197280,"date":"2013-10-13T15:58:06","date_gmt":"2013-10-13T11:58:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=197280"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=197280","title":{"rendered":"<span class=\"post_title\">\u041f\u0438\u0448\u0435\u043c \u0438\u0433\u0440\u044b \u043d\u0430 C++, \u0427\u0430\u0441\u0442\u044c 2\/3 \u2014 State-based \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<a href=\"http:\/\/habrahabr.ru\/post\/197278\/\">\u041f\u0438\u0448\u0435\u043c \u0438\u0433\u0440\u044b \u043d\u0430 C++, \u0427\u0430\u0441\u0442\u044c 1\/3 \u2014 \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0438\u043d\u0438-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/197288\/\">\u041f\u0438\u0448\u0435\u043c \u0438\u0433\u0440\u044b \u043d\u0430 C++, \u0427\u0430\u0441\u0442\u044c 3\/3 \u2014 \u041a\u043b\u0430\u0441\u0441\u0438\u043a\u0430 \u0436\u0430\u043d\u0440\u0430<\/a><\/p>\n<p>  \u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439, \u0425\u0430\u0431\u0440\u0430\u0445\u0430\u0431\u0440!<\/p>\n<p>  \u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u0441, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u0443\u0440\u043e\u043a! \u041e\u043d \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439. \u041e\u0431\u0435\u0449\u0430\u044e, \u0447\u0442\u043e \u0442\u0443\u0442 \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435, \u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 \ud83d\ude42<\/p>\n<h4>\u041e \u0447\u0435\u043c \u044d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c?<\/h4>\n<p>  <\/p>\n<ul>\n<li>\u041c\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043f\u043e\u0441\u0442\u0438\u0447\u044c state-based programming, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u043e\u0432\u044b\u0435 \u0443\u0440\u043e\u0432\u043d\u0438 \u0438 \u043c\u0435\u043d\u044e \u0434\u0435\u043b\u0430\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e<\/li>\n<\/ul>\n<p>  \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u043e\u0441\u0442\u0435 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0433\u0440\u044b \ud83d\ude42<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/b91\/bf0\/12d\/b91bf012d3d3e115dd59f3839dce507c.png\"\/><\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>2.1. \u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f<\/h4>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0438\u0437 \u0447\u0435\u0433\u043e, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0433\u0440\u0430.<\/p>\n<p>  \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0438\u0433\u0440\u0430, \u0433\u0434\u0435 \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e\u0448\u0435\u043a, \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u00ab\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439\u00bb. \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441 \u043d\u0438\u043c\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c? \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u043a\u043e\u0434 \u0442\u0438\u043f\u0430:  <\/p>\n<pre><code class=\"cpp\">    void Update() \t{         switch(state) \t\t{ \t\tcase State::MENU:             \/\/ 100 \u0441\u0442\u0440\u043e\u043a \t\tcase State::SETTINGS:             \/\/ 200 \u0441\u0442\u0440\u043e\u043a \t\tcase State::LEVEL1:             \/\/ \u0421\u0442\u0440\u0430\u0448\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c         }     } <\/code><\/pre>\n<p>  \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043b\u044e\u0442\u044b\u0439 \u043d\u0435\u0437\u0430\u0447\u0435\u0442 \u0432 \u043f\u043b\u0430\u043d\u0435 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.<\/p>\n<p>  \u041a\u0430\u043a \u043d\u0430\u0441\u0447\u0435\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0435\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0430 \u043e\u0442 \u043a\u0430\u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043a\u043b\u0430\u0441\u0441\u0430 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, Screen, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 Game?<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 Screen.h  <\/p>\n<pre><code class=\"cpp\">#ifndef SCREEN_H #define SCREEN_H  #include &quot;Incl.h&quot;  #include &quot;Game.h&quot; class Game;  class Screen { protected: \tGame* game; public: \tvoid SetController(Game* game);  \tvirtual void Start(); \tvirtual void Update(); \tvirtual void Destroy(); };  #endif <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0438\u043c\u0435\u0435\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 Game, \u043e\u0442\u043a\u0443\u0434\u0430 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0438 \u0431\u0435\u0440\u0443\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u0430 Graphics \u0438 Input<br \/>  \u0415\u0433\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u0432:  <\/p>\n<ul>\n<li>Start \u2014 \u0432\u044b\u0437\u043e\u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 (\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c)<\/li>\n<li>Update \u2014 \u0432\u044b\u0437\u043e\u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u0446\u0438\u043a\u043b<\/li>\n<li>Destroy \u2014 \u0432\u044b\u0437\u043e\u0432 \u043f\u043e \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u044e (\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043b\u0438\u0431\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f)<\/li>\n<\/ul>\n<p>  Screen.cpp  <\/p>\n<pre><code class=\"cpp\">#include &quot;Screen.h&quot;  void Screen::SetController(Game* game) { \tthis-&gt;game = game; }  void Screen::Start() { \t }  void Screen::Update() { \t }  void Screen::Destroy() { \t } <\/code><\/pre>\n<p>  \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c Game.h \u0438 Game.cpp  <\/p>\n<pre><code class=\"cpp\">#ifndef _GAME_H_ #define _GAME_H_  #include &quot;Project.h&quot;  #include &quot;Graphics.h&quot; class Graphics; #include &quot;Input.h&quot; class Input; #include &quot;Screen.h&quot; class Screen;  class Game { private: \tbool run;  \tGraphics* graphics; \tInput* input; \tScreen* screen;  public: \tGame(); \tint Execute(Screen* startscreen, int width, int height);  \tGraphics* GetGraphics(); \tInput* GetInput(); \tScreen* GetScreen(); \tvoid SetScreen(Screen* screen);  \tvoid Exit(); };  #endif <\/code><\/pre>\n<p>  \u0412 \u043a\u043b\u0430\u0441\u0441 Game \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 Screen \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f Execute, \u043a\u0443\u0434\u0430 \u0438\u0437 main.cpp \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0430 Screen<\/p>\n<p>  Game.cpp  <\/p>\n<pre><code class=\"cpp\">#include &quot;Game.h&quot;  Game::Game() { \trun = true; }  int Game::Execute(Screen* startscreen, int width, int height) { \tgraphics = new Graphics(width,height); \tinput = new Input(); \tscreen = startscreen;  \tscreen-&gt;SetController(this); \tthis-&gt;screen-&gt;Start();  \twhile(run) \t{ \t\tinput-&gt;Update(); \t\tscreen-&gt;Update(); \t}  \tscreen-&gt;Destroy(); \t \tdelete graphics; \tdelete input; \tdelete screen;  \tSDL_Quit(); \treturn 0; }  Graphics* Game::GetGraphics() { \treturn graphics; }  Input* Game::GetInput() { \treturn input; }  Screen* Game::GetScreen() { \treturn screen; } \t void Game::SetScreen(Screen* screen) { \tthis-&gt;screen-&gt;Destroy(); \tdelete this-&gt;screen; \tthis-&gt;screen = screen; \tthis-&gt;screen-&gt;SetController(this); \tthis-&gt;screen-&gt;Start(); }  void Game::Exit() { \trun = false; } <\/code><\/pre>\n<p>  \u0412\u0430\u0436\u043d\u044b\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 Execute \u2014 \u043e\u043d \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435<br \/>  SetScreen \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044f \u0441\u0442\u0430\u0440\u043e\u0435.<br \/>  GetScreen, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043f\u043e\u0447\u0442\u0438 \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u0435\u043d \u2014 \u0440\u0430\u0437\u0432\u0435 \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0443\u0440\u043e\u0432\u043d\u044f \u0442\u0430\u043a\u0438\u043c \u043c\u0430\u043a\u0430\u0440\u043e\u043c  <\/p>\n<pre><code class=\"cpp\">SetScreen(GetScreen()); <\/code><\/pre>\n<p>  \u041d\u043e \u0433\u043b\u0443\u043f\u043e\u0441\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0440\u0435\u0448\u0430\u0439\u0442\u0435 \u0441\u0430\u043c\u0438 \ud83d\ude42<\/p>\n<h4>2.2. \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c! \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c!<\/h4>\n<p>  \u041f\u043e\u0438\u0433\u0440\u0430\u0435\u043c\u0441\u044f?<br \/>  \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b main.cpp \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0434\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f:  <\/p>\n<pre><code class=\"cpp\">#include &quot;Project.h&quot;  class MyScreen : public Screen { public: \tvoid Start() \t{ \t\tMessageBox(0,&quot;Hello, HabraHabr!&quot;,&quot;Message&quot;,MB_OK); \t} };  int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int) { \tGame game; \treturn game.Execute(new MyScreen(),500,350); } <\/code><\/pre>\n<p>  \u0412\u0441\u0435, \u0447\u0442\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442 \u2014 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 Windows-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0431\u0440\u0430\u0442\u0438\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043e\u043a\u043d\u043e \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043a\u043b\u0438\u043a\u0443 \u043d\u0430 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0435\u0441\u0442\u0438\u043a, \u0438 \u0437\u0430\u0433\u043b\u0430\u0432\u0438\u0435 \u043e\u043a\u043d\u0430 \u0442\u043e\u0436\u0435 \u043d\u0435 \u043f\u043e\u043c\u0435\u0448\u0430\u043b\u043e \u0431\u044b \u0443\u0431\u0440\u0430\u0442\u044c. \u041d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u2014 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0439\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0443:  <\/p>\n<pre><code class=\"cpp\">#include &quot;Project.h&quot;  class MyScreen : public Screen { private: \tInput* input;  public: \tvoid Start() \t{ \t\tinput = game-&gt;GetInput();  \t\tSDL_WM_SetCaption(&quot;Hello, HabraHabr!&quot;,0); \t\tMessageBox(0,&quot;Hello, HabraHabr!&quot;,&quot;Message&quot;,MB_OK); \t} \tvoid Update() \t{ \t\tif(input-&gt;IsKeyDown('w') || input-&gt;IsExit()) \t\t\tgame-&gt;Exit(); \t} };  int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int) { \tGame game; \treturn game.Execute(new MyScreen(),500,350); } <\/code><\/pre>\n<p>  \u041c\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0447\u0435\u0440\u043d\u044b\u043c \u043e\u043a\u043d\u043e\u043c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0430\u0440\u0438\u0441\u0443\u0435\u043c?<\/p>\n<pre><code class=\"cpp\">#include &quot;Project.h&quot;  class MyScreen : public Screen { private: \tInput* input; \tGraphics* graphics;  \tImage* test;  public: \tvoid Start() \t{ \t\tinput = game-&gt;GetInput(); \t\tgraphics = game-&gt;GetGraphics(); \t\tSDL_WM_SetCaption(&quot;Hello, HabraHabr!&quot;,0); \t \t\ttest = graphics-&gt;NewImage(&quot;habr.bmp&quot;); \t} \tvoid Update() \t{ \t\tif(input-&gt;IsExit()) \t\t\tgame-&gt;Exit();  \t\tgraphics-&gt;DrawImage(test,0,0); \t\tgraphics-&gt;Flip(); \t} };  int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int) { \tGame game; \treturn game.Execute(new MyScreen(),300,225); } <\/code><\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/b91\/bf0\/12d\/b91bf012d3d3e115dd59f3839dce507c.png\"\/><\/p>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u0441\u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u0432 \u043f\u043b\u0430\u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0439\u043c\u0435\u0442, \u0447\u0442\u043e \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0446\u0438\u043a\u043b \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u2014 \u0441\u0442\u0440\u043e\u0447\u043a\u0438  <\/p>\n<pre><code class=\"cpp\">\t\tgraphics-&gt;DrawImage(test,0,0); \t\tgraphics-&gt;Flip(); <\/code><\/pre>\n<p>  \u041d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0438\u0437 Update() \u0432 \u043a\u043e\u043d\u0435\u0446 Start()<\/p>\n<h4>2.3. \u0418\u0442\u043e\u0433\u0438<\/h4>\n<p>  \u042f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u044b \u0431\u044b\u043b\u0438 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u044b \u0438 \u0443\u0437\u043d\u0430\u043b\u0438 \u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \ud83d\ude42<br \/>  \u0422\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 \u043a \u0442\u0440\u0435\u0442\u044c\u0435\u043c\u0443 \u0443\u0440\u043e\u043a\u0443 \u0431\u0435\u0437 \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u0439<\/p>\n<p>  \u041f\u043e \u0432\u0441\u0435\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0439\u0442\u0435\u0441\u044c \u0432 \u041b\u0421, \u0430 \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u0432\u0435\u0437\u043b\u043e \u0431\u044b\u0442\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043d\u0430 \u0445\u0430\u0431\u0440\u0435, \u043f\u0438\u0448\u0438\u0442\u0435 \u043d\u0430 \u043c\u0435\u0439\u043b izarizar@mail.ru<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/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\/197280\/\"> http:\/\/habrahabr.ru\/post\/197280\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<a href=\"http:\/\/habrahabr.ru\/post\/197278\/\">\u041f\u0438\u0448\u0435\u043c \u0438\u0433\u0440\u044b \u043d\u0430 C++, \u0427\u0430\u0441\u0442\u044c 1\/3 \u2014 \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0438\u043d\u0438-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/197288\/\">\u041f\u0438\u0448\u0435\u043c \u0438\u0433\u0440\u044b \u043d\u0430 C++, \u0427\u0430\u0441\u0442\u044c 3\/3 \u2014 \u041a\u043b\u0430\u0441\u0441\u0438\u043a\u0430 \u0436\u0430\u043d\u0440\u0430<\/a><\/p>\n<p>  \u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439, \u0425\u0430\u0431\u0440\u0430\u0445\u0430\u0431\u0440!<\/p>\n<p>  \u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u0441, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u0443\u0440\u043e\u043a! \u041e\u043d \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439. \u041e\u0431\u0435\u0449\u0430\u044e, \u0447\u0442\u043e \u0442\u0443\u0442 \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435, \u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 \ud83d\ude42<\/p>\n<h4>\u041e \u0447\u0435\u043c \u044d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c?<\/h4>\n<p>  <\/p>\n<ul>\n<li>\u041c\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043f\u043e\u0441\u0442\u0438\u0447\u044c state-based programming, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u043e\u0432\u044b\u0435 \u0443\u0440\u043e\u0432\u043d\u0438 \u0438 \u043c\u0435\u043d\u044e \u0434\u0435\u043b\u0430\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e<\/li>\n<\/ul>\n<p>  \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u043e\u0441\u0442\u0435 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0433\u0440\u044b \ud83d\ude42<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/b91\/bf0\/12d\/b91bf012d3d3e115dd59f3839dce507c.png\"\/><\/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-197280","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/197280","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=197280"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/197280\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=197280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=197280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=197280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}