{"id":285198,"date":"2017-04-19T13:56:08","date_gmt":"2017-04-19T09:56:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=285198"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=285198","title":{"rendered":"\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0421++ \u043a\u043e\u0434 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u043c?"},"content":{"rendered":"<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u0442\u043e-\u0442\u043e, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u0441\u043f\u0440\u043e\u0441\u0438\u0442: \u00ab\u0417\u0430\u0447\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u043a\u043e\u0434\u043e\u043c?! \u0412\u0435\u0434\u044c \u0421++ \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 \u044f\u0437\u044b\u043a!\u00bb. \u0412 \u0446\u0435\u043b\u043e\u043c, \u044d\u0442\u043e \u0442\u0430\u043a\u2026 \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043a\u0430 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435\u0442 \u0437\u0430\u0432\u044f\u0437\u043e\u043a \u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b\u2026<\/p>\n<p>  \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438, \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443, \u0440\u0435\u0434\u043a\u043e \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u00ab\u0410 \u0442\u043e\u0447\u043d\u043e \u043b\u0438 \u044d\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u0421++? \u0410 \u0432\u0434\u0440\u0443\u0433 \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043c\u043e\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u00bb. \u041e\u043d\u0438 \u043f\u0438\u0448\u0443\u0442 \u043a\u043e\u0434, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u0441\u0431\u043e\u0440\u043a\u0443 \u0438 \u0447\u0438\u043d\u044f\u0442 \u043c\u0435\u0441\u0442\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0440\u0443\u0433\u0430\u043b\u0441\u044f \u0438\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440. <br \/>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435, \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u00ab\u0437\u0430\u0442\u043e\u0447\u0435\u043d\u043e\u00bb \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 (\u0438 \u0434\u0430\u0436\u0435 \u043f\u043e\u0434 \u0435\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e!) \u0438 \u0446\u0435\u043b\u0435\u0432\u0443\u044e \u041e\u0421. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0438\u0437-\u0437\u0430 \u0441\u043a\u0443\u0434\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0421++ \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0435\u0449\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c, \u043d\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u043c API \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>  \u0422\u0430\u043a \u0431\u044b\u043b\u043e \u0438 \u0443 \u043d\u0430\u0441 \u0432 \u0422\u0435\u043d\u0437\u043e\u0440\u0435. \u041c\u044b \u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430 MS Visual Studio 2010. \u041d\u0430\u0448\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u0431\u044b\u043b\u0438 32-\u0445 \u0431\u0438\u0442\u043d\u044b\u043c\u0438 Windows-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u0418, \u0441\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439, \u043a\u043e\u0434 \u0431\u044b\u043b \u043f\u0440\u043e\u043d\u0438\u0437\u0430\u043d \u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438 \u0437\u0430\u0432\u044f\u0437\u043a\u0430\u043c\u0438 \u043d\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043e\u0442 Microsoft. \u041e\u0434\u043d\u0430\u0436\u0434\u044b \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u043f\u043e\u0440\u0430 \u043e\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u044b: \u043f\u043e\u0440\u0430 \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u0421\u0411\u0418\u0421 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u0434 Linux \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u041e\u0421, \u043f\u043e\u0440\u0430 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u00ab\u0436\u0435\u043b\u0435\u0437\u043e\u00bb (POWER).<\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u043c\u0438 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438; \u043a\u0430\u043a \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 Linux, MacOS \u0438 \u0434\u0430\u0436\u0435 \u043f\u043e\u0434 iOS \u0438 Android; \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0441\u0432\u043e\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 (x86-64, POWER, ARM \u0438 \u0434\u0440\u0443\u0433\u0438\u0435); \u043a\u0430\u043a \u043d\u0430\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 big-endian \u043c\u0430\u0448\u0438\u043d\u0430\u0445.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/061\/63c\/d9b\/06163cd9b2474cc4bb5b9e4a2258e022.png\"\/><br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u0430 \u0432\u0441\u0435\u0445 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u2014 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u00ab\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0421\u0411\u0418\u0421\u00bb (\u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u2014 \u00ab\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u00bb), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0441 Qt. \u0412 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443: \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u0430 \u0432 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u0434\u043e \u043c\u043e\u0449\u043d\u043e\u0433\u043e \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. <\/p>\n<p>  \u041d\u0430 \u0431\u0430\u0437\u0435 \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043d\u0430\u0448\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b (\u0434\u0430\u0436\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f), \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0435 \u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0438. \u041d\u0430\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c \u0438\u0445 \u043a\u043e\u0434 (\u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043a\u043e\u0434 \u00ab\u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u043c\u00bb) \u043e\u0442 \u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u0430\u0432\u044f\u0437\u043e\u043a \u043d\u0430 \u0446\u0435\u043b\u0435\u0432\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0443\u044e \u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443, \u0441\u043f\u0440\u044f\u0442\u0430\u0432 \u0432\u0441\u044e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0443 \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u0430\u0445 \u043d\u0430\u0448\u0435\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430.<\/p>\n<p>  \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0421\u0411\u0418\u0421 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 \u0421++, \u043d\u043e \u044d\u0442\u043e \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u0432 \u0432\u044b\u0431\u043e\u0440\u0435 \u044f\u0437\u044b\u043a\u0430, \u043a\u0440\u043e\u043c\u0435 C++ \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b JavaScript, Python, SQL. <\/p>\n<p>  \u041d\u0430\u0448\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442 \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u00ab\u0447\u0438\u043d\u0438\u0442\u044c \u043f\u043e\u0435\u0437\u0434 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u043c \u0445\u043e\u0434\u0443\u00bb \ud83d\ude42 <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 75.0019%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/UZq4sZz56qM?rel=0&amp;showinfo=1\" frameborder=\"0\" allowfullscreen=\"true\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\" style=\"top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  \u041d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0435 \u043f\u043e\u0441\u0442\u0440\u0430\u0434\u0430\u043b\u0438 \u043e\u0442 \u043d\u0430\u0448\u0435\u0439 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043e\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u043e\u0434 Windows \u043d\u0430 MSVC. \u042d\u0442\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u043b\u0438\u044f\u043b\u043e \u043d\u0430 \u043c\u043d\u043e\u0433\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0443 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442, \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0446\u0438\u0444\u0440\u044b:  <\/p>\n<ul>\n<li>\u041e\u0431\u044a\u0435\u043c \u043a\u043e\u0434\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 ~2 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430 \u0441\u0442\u0440\u043e\u043a<\/li>\n<li>\u041e\u0431\u044a\u0435\u043c \u00ab\u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0433\u043e\u00bb \u043a\u043e\u0434\u0430 (\u043a\u043e\u0434, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0421\u0411\u0418\u0421, \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0438), \u0441\u043b\u043e\u0436\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c, \u043d\u043e \u043e\u043d \u0432 \u0440\u0430\u0437\u044b \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043c \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b<\/li>\n<li>\u0421\u0432\u044b\u0448\u0435 \u0442\u044b\u0441\u044f\u0447\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0432 \u0434\u0435\u0441\u044f\u0442\u0438 \u0446\u0435\u043d\u0442\u0440\u0430\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/li>\n<\/ul>\n<p>  \u0421\u043a\u0443\u0447\u043d\u043e\u0435 \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u043c\u0441\u044f \u043a \u0434\u0435\u043b\u0443 \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c.<\/p>\n<h2>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 API \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h2>\n<p>  \u041a\u0430\u043a \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0421++ \u043e\u0447\u0435\u043d\u044c \u0441\u043a\u0443\u0434\u043d\u0430\u044f, \u043e\u043d\u0430 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u0438\u0445 \u0432\u0441\u044e\u0434\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0421++11 \u043d\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0435\u0442\u044c\u044e\u2026 \u0422\u043e \u0435\u0441\u0442\u044c, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441, \u043c\u044b \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u044b\u2026 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434!<\/p>\n<p>  \u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u0441\u0443\u0433\u0443\u0431\u043b\u044f\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043d\u0435 \u0441\u0430\u043c\u0443\u044e \u0441\u0432\u0435\u0436\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0443 \u043d\u0430\u0441 \u2014 \u0432 MSVS 2010 \u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 C++11, \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u0432 \u044f\u0434\u0440\u0435 \u044f\u0437\u044b\u043a\u0430 \u0438 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435.<\/p>\n<p>  \u041d\u043e, \u043a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e. \u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432:  <\/p>\n<ul>\n<li> \u041f\u0438\u0448\u0435\u043c \u0441\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0441, \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u0432\u044b\u0437\u043e\u0432\u0430\u0445 API \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u044b\u043c\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430\u043c\u0438 ifdef \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.<\/li>\n<li> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u2014 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a (\u043e\u043f\u044f\u0442\u044c \u0436\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0431\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0441\u043f\u0435\u0446\u0435\u0444\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u044e\u0442 \u043d\u0430\u0448\u0443 \u0437\u0430\u0434\u0430\u0447\u0443. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 HTTP-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043c\u044b \u0432\u0437\u044f\u043b\u0438 cURL.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432<\/h2>\n<p>  \u0412 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0435\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438. \u0418 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0436\u0435 \u043d\u0430 100% \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0441\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435.<\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0441\u0447\u0438\u0442\u0430\u044e\u0442 \u0441\u0432\u043e\u0438\u043c \u0434\u043e\u043b\u0433\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0432\u043e\u0451 \u0434\u0435\u0442\u0438\u0449\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445 \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c, \u0438 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0432\u043e\u0446\u0438\u0440\u0443\u044e\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043d\u0435\u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>  \u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432 \u0438\u0442\u043e\u0433\u0435? \u041a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0447\u0435\u0442\u043a\u043e \u043f\u043e \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443, \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0441\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435; \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435, \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0441\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0438\u043b\u0438 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0442\u0430\u043a \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c\u2026<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u0412\u043e\u0442 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<pre><code class=\"cpp\">throw std::exception( &quot;\u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a&quot; ); \/\/ \u0441\u043e\u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 MSVC++, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u043d\u0435\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430<\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u043e\u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0432 MSVC++, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440: <\/p>\n<pre><code class=\"cpp\">exception( const char* msg ) noexcept;<\/code><\/pre>\n<p>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0435\u0442 \u043e\u0431\u0449\u0438\u0445 \u043f\u0440\u0438\u0435\u043c\u043e\u0432, \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0445 \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0412 \u044d\u0442\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u044b\u0442, \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0438 \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0437\u043d\u0430\u043d\u0438\u0435 \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u0421++.<\/p>\n<p>  \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u044f \u0432\u0435\u0440\u043d\u0443\u0441\u044c \u043a \u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0443, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0448\u0443 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0443 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u041d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412 \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 \u0421++ \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0442\u0435\u0440\u043c\u0438\u043d \u00abundefined behavior\u00bb (\u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435).<br \/>  \u0412\u043e\u0442 \u0435\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438\u0437 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438:  <\/p>\n<blockquote><p>\u041d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 (\u0430\u043d\u0433\u043b. undefined behavior, \u0432 \u0440\u044f\u0434\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435[1][2]) \u2014 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0432 \u0421\u0438), \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043c\u0430\u0440\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0439 \u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 (\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u044b) \u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u043d\u0430\u043f\u043e\u0434\u043e\u0431\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u043b\u0438 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0432\u0448\u0435\u0433\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0430 (\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u044b) \u0432 \u043b\u044e\u0431\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445, \u0430 \u0433\u043e\u0432\u043e\u0440\u0438\u0442: \u00ab\u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0410 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0411 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u00bb. \u0414\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u043e\u0439; \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u043e\u043d\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0439 \u0438 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u041e\u0421 \u0438\u043b\u0438 \u043f\u0440\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430.<\/p><\/blockquote>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d1f\/50e\/b84\/d1f50eb84efb4720b63255541765b8be.png\"\/><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u0435 undefined behavior \u0432 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435, \u0442\u043e \u044d\u0442\u043e \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0430\u0434\u0430\u0442\u044c \u0438\u043b\u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c. \u0422\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041d\u043e \u043b\u044e\u0431\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438\u043b\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0432\u0441\u0435 \u0441\u043b\u043e\u043c\u0430\u0442\u044c!<\/p>\n<p>  \u041c\u043d\u043e\u0433\u0438\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0441 undefined behavior \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435 \u0432\u044b\u0434\u0430\u044e\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0438 \u0432\u0430\u0448\u0435 \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u0448\u0432\u0435\u0439\u0446\u0430\u0440\u0441\u043a\u0438\u0435 \u0447\u0430\u0441\u044b. \u041d\u043e \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u043c\u0435\u043d\u044f\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u0434\u0440\u0443\u0433\u0438\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c), \u044d\u0442\u0438 \u0431\u0430\u0433\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0437\u0430\u044f\u0432\u043b\u044f\u0442\u044c \u043e \u0441\u0435\u0431\u0435 \u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043b\u043e\u043c\u0430\u044e\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443.<\/p>\n<p>  \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 undefined behavior \u2014 \u044d\u0442\u043e \u0432\u044b\u0445\u043e\u0434 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043d\u0430 \u0441\u0442\u0435\u043a\u0435. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439. \u042d\u0442\u043e\u0442 \u0431\u0430\u0433 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u043b \u0441\u0435\u0431\u044f \u043f\u043e\u0434 Windows \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043b\u0435\u0442 \u0438 \u00ab\u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0438\u043b\u00bb \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434 Linux:<\/p>\n<pre><code class=\"cpp\">std::string SomeFunction() {    char hex[9];    \/\/ some code    hex[9] = 0; \/\/ \u0442\u0443\u0442 \u0432\u044b\u0445\u043e\u0434 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430    return hex; }<\/code><\/pre>\n<p>  \u041f\u043e \u0432\u0441\u0435\u0439 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, MSVS \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b\u0430 \u0431\u0443\u0444\u0435\u0440 \u043d\u0430 \u0441\u0442\u0435\u043a\u0435, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0439\u0442, \u0438 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0438 \u0447\u0443\u0436\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u044b \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0438 \u043d\u0430 \u043f\u0443\u0441\u0442\u043e\u0435, \u043d\u0438\u043a\u0435\u043c \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0435 \u043c\u0435\u0441\u0442\u043e. \u0410 \u0432 GCC \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u0442\u0430\u043b\u0430 \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u2014 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0430\u0434\u0430\u043b\u0430 \u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0432\u0438\u0434\u0438\u043c\u043e, GCC \u0437\u0430\u0438\u043d\u043b\u0430\u0439\u043d\u0438\u043b \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0438 \u043e\u043d\u0430 \u0441\u0442\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u0440\u0443\u0433\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438).<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0438 \u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u044f\u0449\u043d\u044b\u0435, \u0442\u0440\u0443\u0434\u043d\u043e\u0443\u043b\u043e\u0432\u0438\u043c\u044b\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0441 UB. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0433\u0440\u0430\u0431\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 std::sort:<\/p>\n<pre><code class=\"cpp\">std::vector&lt; std::string &gt; v = some_func(); std::sort( v.begin(), v.end(),    []( const std::string& s1, const std::string& s2 ) {    if( s1.empty() )       return true;    return s1 &lt; s2; } );<\/code><\/pre>\n<p>  \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0433\u0434\u0435 \u0442\u0443\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c UB? \u0410 \u0432\u0441\u0435 \u0434\u0435\u043b\u043e \u0432 \u00ab\u043f\u043b\u043e\u0445\u043e\u043c\u00bb \u043a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440\u0435.<br \/>  \u041a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u0435\u0440\u043d\u0443\u0442\u044c true, \u0435\u0441\u043b\u0438 s1 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0434 s2. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u044b\u0434\u0430\u0441\u0442 \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440, \u0435\u0441\u043b\u0438 \u0435\u043c\u0443 \u043d\u0430 \u0432\u0445\u043e\u0434 \u043f\u043e\u0434\u0430\u0442\u044c \u0434\u0432\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<pre><code class=\"cpp\">s1 = &quot;&quot;;    s2 = &quot;&quot;;    cmp( s1, s2 ) == true =&gt; s1 \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u0442\u043e\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u0434 s2    cmp( s2, s1 ) == true =&gt; s2 \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u0442\u043e\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u0434 s1<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0442 \u0441\u0430\u043c \u0441\u0435\u0431\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435 \u0437\u0430\u0434\u0430\u0435\u0442 strict weak ordering (\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Weak_ordering#Strict_weak_orderings\">en.wikipedia.org\/wiki\/Weak_ordering#Strict_weak_orderings<\/a>).<br \/>  \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043c\u044b \u043d\u0430\u0440\u0443\u0448\u0438\u043b\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f std::sort \u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0418 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0422\u0430\u043a\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043c\u044b \u043f\u043e\u0439\u043c\u0430\u043b\u0438 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 Linux. \u041a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440 \u0441 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0434\u043e\u043b\u0433\u0438\u0435 \u0433\u043e\u0434\u044b \u043f\u043e\u0434 Windows \u0438\u2026 \u043d\u0430\u0447\u0430\u043b \u0440\u0443\u0448\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 SIGSEGV \u043f\u043e\u0434 Linux (i686). \u0427\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0431\u0430\u0433 \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u043f\u043e \u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u0434\u0430\u0436\u0435 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u0445 Linux (\u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 GCC \u043d\u0430 \u0431\u043e\u0440\u0442\u0443): \u0433\u0434\u0435-\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0430\u0434\u0430\u0435\u0442, \u0433\u0434\u0435-\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0430\u0435\u0442, \u0433\u0434\u0435-\u0442\u043e \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c.<\/p>\n<p>  \u0417\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0441 undefined behavior \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043b\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438 (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0441\u0431\u043e\u0440\u043a\u0438 \u0441\u0442\u043e\u0438\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439. \u0410 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 warning \u0432 \u0442\u043e\u043b\u043f\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0432\u0438\u0434\u0430 \u00ab\u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f\u00bb, \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u043f\u0440\u0438\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u0434\u0435, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u043f\u0446\u0438\u044e \u0441\u0431\u043e\u0440\u043a\u0438 \u00ab\u0442\u0440\u0430\u043a\u0442\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u043e\u0448\u0438\u0431\u043a\u0438\u00bb, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043d\u0435\u0437\u0430\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439.<\/p>\n<h2>\u041c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>  \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0421++ \u043d\u0435 \u0434\u0430\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0436\u0435\u0441\u0442\u043a\u0438\u0445 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439 \u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430; \u043e\u043d \u0437\u0430\u0434\u0430\u0435\u0442 \u043b\u0438\u0448\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, sizeof(char) &lt;= sizeof(short) &lt;= sizeof(int) &lt;= sizeof(long) &lt;= sizeof(long long)) \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u0442\u0438\u043f\u043e\u0432.<\/p>\n<p>  \u041d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432. \u0420\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u0434 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0435\u0439 \u0442\u0438\u043f\u043e\u0432, \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0445 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<br \/>  \u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u043d\u0438\u0436\u0435, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0435\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0421++.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/179\/265\/077\/179265077030489eaec0d3f3c18e84b9.png\"\/><\/p>\n<p>  \u0412 \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0443\u0436\u043d\u044b \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438 \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430. \u041d\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u0437\u0430\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u0418 \u0432\u043d\u043e\u0432\u044c \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u0438\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0443\u044e \u0438\u043b\u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u044b: \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u043e\u0434 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u2014 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0438\u043b\u0438 \u0432\u043e\u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0438\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043d\u0430 \u043e\u0434\u043d\u0438\u0445 \u0438 \u0442\u0435\u0445 \u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445:<\/p>\n<pre><code class=\"cpp\">unsigned long some_hash( const unsigned char* buf, size_t size ) {     unsigned long res = 0;     for( size_t i = 0; i &lt; size; ++i )         res = res * buf[i] + buf[i] + i;    return res;  }<\/code><\/pre>\n<p>  \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f\u044b \u0441 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c: <\/p>\n<pre><code class=\"cpp\">std::int8_t, std::int16_t \u0438 \u0442. \u043f. std::uint32_t some_hash( const unsigned char* buf, size_t size ) {     std::uint32_t res = 0;     for( size_t i = 0; i &lt; size; ++i )         res = res * buf[i] + buf[i] + i;    return res;  }<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0417\u043d\u0430\u043a\u043e\u0432\u043e\u0441\u0442\u044c char<\/h2>\n<p>  \u041f\u043e\u043b\u0430\u0433\u0430\u044e, \u043d\u0435 \u043c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u0438\u0441\u044c, \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043b\u0438 char. \u0410 \u0438 \u0435\u0441\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441, \u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043b\u0438 \u0441\u0432\u043e\u044e \u043b\u044e\u0431\u0438\u043c\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043a\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u043e\u0442\u0432\u0435\u0442\u2026 \u0432\u0435\u0440\u043d\u044b\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0421++ \u043d\u0435 \u043e\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0441\u0442\u044c \u0442\u0438\u043f\u0430 char. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 char \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439, \u0430 \u0435\u0441\u0442\u044c \u0442\u0435, \u0433\u0434\u0435 char \u2014 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439.<br \/>  \u0418 \u044d\u0442\u043e \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u043f\u0440\u0438\u0447\u0438\u043d\u0430, \u0438\u0437-\u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0448\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u043e\u0434 \u0434\u0440\u0443\u0433\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u0432 Linux x86-64, \u043d\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 Linux POWER (\u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0432 GCC \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e):<\/p>\n<pre><code class=\"cpp\">bool is_ascii( char s ) {    return s &gt;= 0; }<\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044f\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443:<\/p>\n<pre><code class=\"cpp\">bool is_ascii( char s ) {    return static_cast&lt;signed char&gt;( s ) &gt;= 0; }<\/code><\/pre>\n<p>  \u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u0438 \u0432\u043e\u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"cpp\">bool is_ascii( char s ) {    return s & 0x80 == 0; }<\/code><\/pre>\n<p>  <\/p>\n<h2>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a<\/h2>\n<p>  \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0421++ \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0440\u0435\u0433\u043b\u0430\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b, \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0440\u0435\u0448\u0430\u0435\u0442 \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044e.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439, \u043a\u0430\u043a \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b.<br \/>  \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 MSVS \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0432 Windows-1251, \u0430 GCC \u2014 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0432 UTF-8.<\/p>\n<p>  \u0418\u0437-\u0437\u0430 \u0442\u0430\u043a\u0438\u0445 \u043e\u0442\u043b\u0438\u0447\u0438\u0439 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u0432\u044b\u0434\u0430\u0441\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: strlen(\u00ab\u0425\u0430\u0431\u0440\u00bb) \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 MSVS \u0432\u044b\u0434\u0430\u0441\u0442 4; \u0432 GCC \u2014 8.<\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438\u0434\u0443\u0442 \u0438 \u043f\u0440\u0438 \u0432\u0432\u043e\u0434\u0435-\u0432\u044b\u0432\u043e\u0434\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0448\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0443\u043c\u0435\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445:<\/p>\n<pre><code class=\"cpp\">std::string readstr() {    std::ifstream f( &quot;file.txt&quot; );    std::string s;    std::getline( f, s );    return s; }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cpp\">void writestr( const std::string& s ) {   std::ofstream f( &quot;file.txt&quot; );   f.write( s.c_str(), s.size() ); }<\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u043e, \u043f\u043e\u043a\u0430 \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u043f\u0438\u0448\u0443\u0442 \u0438 \u0447\u0438\u0442\u0430\u044e\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u0434\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438. \u041d\u043e \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0437\u0430\u043f\u0438\u0448\u0435\u0442 Windows-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0430 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 Linux?.. \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u00ab\u043a\u0440\u0430\u043a\u043e\u0437\u044f\u0431\u0440\u044b\u00bb \ud83d\ude42<\/p>\n<p>  \u0420\u040e\u0421\u201a\u0420\u00b0\u0420\u0405\u0420\u0491\u0420\u00b0\u0421\u0402\u0421\u201a \u0420\u040e++ \u0420\u0405\u0420\u0451\u0420\u0454\u0420\u00b0\u0420\u0454 \u0420\u0405\u0420\u00b5 \u0421\u0402\u0420\u00b5\u0420\u0456\u0420\u00bb\u0420\u00b0\u0420\u0458\u0420\u00b5\u0420\u0405\u0421\u201a\u0420\u0451\u0421\u0402\u0421\u0453\u0420\u00b5\u0421\u201a \u0420\u0405\u0420\u00b5\u0420\u0454\u0420\u0455\u0421\u201a\u0420\u0455\u0421\u0402\u0421\u2039\u0420\u00b5 \u0420\u00b0\u0421\u0403\u0420\u0457\u0420\u00b5\u0420\u0454\u0421\u201a\u0421\u2039, \u0420\u0451 \u0420\u0454\u0420\u00b0\u0420\u00b6\u0420\u0491\u0421\u2039\u0420\u2116\u0420\u0454\u0420\u0455\u0420\u0458\u0420\u0457\u0420\u0451\u0420\u00bb\u0421\u040f\u0421\u201a\u0420\u0455\u0421\u0402 \u0421\u0402\u0420\u00b5\u0421\u20ac\u0420\u00b0\u0420\u00b5\u0421\u201a \u0421\u040c\u0421\u201a\u0420\u0451 \u0420\u0406\u0420\u0455\u0420\u0457\u0421\u0402\u0420\u0455\u0421\u0403\u0421\u2039 \u0420\u0457\u0420\u0455 \u0421\u0403\u0420\u0406\u0420\u0455\u0420\u00b5\u0420\u0458\u0421\u0453 \u0421\u0453\u0421\u0403\u0420\u0458\u0420\u0455\u0421\u201a\u0421\u0402\u0420\u00b5\u0420\u0405\u0420\u0451\u0421\u040b.\u0420\u045c\u0420\u00b0\u0420\u0457\u0421\u0402\u0420\u0451\u0420\u0458\u0420\u00b5\u0421\u0402, \u0420\u0405\u0420\u00b5\u0421\u201a \u0420\u0405\u0420\u0451\u0420\u0454\u0420\u00b0\u0420\u0454\u0420\u0451\u0421\u2026 \u0420\u0456\u0420\u00b0\u0421\u0402\u0420\u00b0\u0420\u0405\u0421\u201a\u0420\u0451\u0420\u2116, \u0420\u0454\u0420\u00b0\u0420\u0454 \u0420\u00b1\u0421\u0453\u0420\u0491\u0421\u0453\u0421\u201a \u0420\u0457\u0421\u0402\u0420\u00b5\u0420\u0491\u0421\u0403\u0421\u201a\u0420\u00b0\u0420\u0406\u0420\u00bb\u0420\u00b5\u0420\u0405\u0421\u2039 \u0420\u0406 \u0420\u0457\u0420\u00b0\u0420\u0458\u0421\u040f\u0421\u201a\u0420\u0451 \u0421\u0403\u0421\u201a\u0421\u0402\u0420\u0455\u0420\u0454\u0420\u0455\u0420\u0406\u0421\u2039\u0420\u00b5 \u0420\u0454\u0420\u0455\u0420\u0405\u0421\u0403\u0421\u201a\u0420\u00b0\u0420\u0405\u0421\u201a\u0421\u2039.\u0420\u0459\u0420\u0455\u0420\u0458\u0420\u0457\u0420\u0451\u0420\u00bb\u0421\u040f\u0421\u201a\u0420\u0455\u0421\u0402 MSVS \u0420\u0454\u0420\u0455\u0420\u0491\u0420\u0451\u0421\u0402\u0421\u0453\u0420\u00b5\u0421\u201a \u0421\u0403\u0421\u201a\u0421\u0402\u0420\u0455\u0420\u0454\u0420\u0455\u0420\u0406\u0421\u2039\u0420\u00b5 \u0420\u0454\u0420\u0455\u0420\u0405\u0421\u0403\u0421\u201a\u0420\u00b0\u0420\u0405\u0421\u201a\u0421\u2039 \u0420\u0406 Windows-1251, \u0420\u00b0 GCC \u0432\u0402\u201d\u0420\u0457\u0420\u0455 \u0421\u0453\u0420\u0458\u0420\u0455\u0420\u00bb\u0421\u2021\u0420\u00b0\u0420\u0405\u0420\u0451\u0421\u040b \u0420\u0454\u0420\u0455\u0420\u0491\u0420\u0451\u0421\u0402\u0421\u0453\u0420\u00b5\u0421\u201a \u0420\u0406 UTF-8<\/p>\n<p>  \u041a\u0430\u043a \u0431\u044b\u0442\u044c \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445? \u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043e\u0434\u0438\u043d \u2014 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0443\u043d\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u043f\u0440\u0438 \u0432\u0432\u043e\u0434\u0435-\u0432\u044b\u0432\u043e\u0434\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u044f\u0432\u043d\u043e\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\/\u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a. \u041c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443 UTF-8 \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445. \u0418 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041d\u043e, \u043a\u0430\u043a \u044f \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b \u0432\u044b\u0448\u0435, \u043c\u044b \u00ab\u0447\u0438\u043d\u0438\u043b\u0438 \u043f\u043e\u0435\u0437\u0434 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u043c \u0445\u043e\u0434\u0443\u00bb, \u0438 \u043c\u044b \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u0441\u043b\u043e\u043c\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0441\u044f \u043d\u0430\u0448 \u043a\u043e\u0434 (\u043e\u043d \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0441\u044f \u0441 \u0443\u0447\u0435\u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 \u0441\u0442\u0440\u043e\u043a \u2014 Windows-1251):  <\/p>\n<ul>\n<li>\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0448\u0438\u0440\u0438\u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0438\u043c\u0432\u043e\u043b\u0443 \u043f\u043e \u0435\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443<\/li>\n<li>\u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0432 \u043a\u043e\u0434\u0435<\/li>\n<\/ul>\n<p>  \u0412 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 UTF-8 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0431\u0430\u0439\u0442, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044e \u043e\u043d\u0430 \u043d\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442. \u0412\u0442\u043e\u0440\u043e\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 UTF-8 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0432 MSVC 2010, \u0433\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043a\u043e\u0434\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 Windows-1251. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 UTF-8, \u0438 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438\u2026 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0431\u0441\u0442\u0440\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0441\u0442\u0440\u043e\u043a\u0438, \u0438 \u043f\u0435\u0440\u0435\u0448\u043b\u0438 \u043d\u0430 \u00ab\u0448\u0438\u0440\u043e\u043a\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438\u00bb (wide strings). <\/p>\n<p>  \u0422\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u043b\u043e \u043d\u0430\u0448\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f:  <\/p>\n<ul>\n<li>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430 \u0432\u0441\u0435\u0445 UNIX-\u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u00ab\u0448\u0438\u0440\u043e\u043a\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438\u00bb \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u043e\u0439 UTF-32, \u0442\u043e \u0435\u0441\u0442\u044c \u0448\u0438\u0440\u0438\u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u043d\u0435\u0439 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0442\u0438\u043f\u0430 wchar_t<\/li>\n<li>\u041d\u0430 Windows \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f UTF-16. \u0421 \u044d\u0442\u043e\u0439 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u0434\u0435\u043b\u043e \u043e\u0431\u0441\u0442\u043e\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0441\u0443\u0440\u0440\u043e\u0433\u0430\u0442\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0438. \u041d\u043e, \u043a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432\u0441\u0435, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0432 Windows-1251, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043d\u0430\u0448\u0435 Windows-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0434\u0432\u0443\u0445\u0431\u0430\u0439\u0442\u043e\u0432\u044b\u043c\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044f\u043c\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u0443\u0440\u0440\u043e\u0433\u0430\u0442\u043d\u044b\u0435 \u043f\u0430\u0440\u044b \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u043e\u0434 Windows \u0432\u0441\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432\u043b\u0435\u0437\u0430\u044e\u0442 \u0432 \u043e\u0434\u0438\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0442\u0438\u043f\u0430 wchar_t.<\/li>\n<li>\u0412 \u0421++ \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u00ab\u0448\u0438\u0440\u043e\u043a\u0438\u0435\u00bb \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, L\u00ab\u041f\u0440\u0438\u0432\u0435\u0442, \u0445\u0430\u0431\u0440!\u00bb. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0430\u043c \u0437\u0430\u0431\u043e\u0442\u0438\u0442\u0441\u044f \u043e \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0438 \u0444\u0430\u0439\u043b\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430 \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d wchar_t \u043d\u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/li>\n<\/ul>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u00ab\u0448\u0438\u0440\u043e\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a\u00bb \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0440\u044f\u0434 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432:  <\/p>\n<ul>\n<li>\u0412 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445 \u0421 \u0438 \u0421++ \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u00ab\u0448\u0438\u0440\u043e\u043a\u0438\u043c\u0438 \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438\u00bb \u2014 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 strlen, strstr, \u043a\u043b\u0430\u0441\u0441\u043e\u0432 std::string, std::stringstream \u0438 \u0442. \u043f.<\/li>\n<li>\u041c\u043d\u043e\u0433\u0438\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u00ab\u0448\u0438\u0440\u043e\u043a\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438\u00bb (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, BOOST)<\/li>\n<li>\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c WinAPI \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u00ab\u0448\u0438\u0440\u043e\u043a\u0438\u043c\u0438 \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438\u00bb<\/li>\n<\/ul>\n<p>  \u041d\u0430 \u0432\u0441\u0435\u0445 \u043d\u0443\u0436\u043d\u044b\u0445 \u043d\u0430\u043c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 \u00ab\u0448\u0438\u0440\u043e\u043a\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b\u00bb \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b Unicode. \u0417\u0430 \u0441\u0447\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0448\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u043b\u0430\u0442\u0438\u043d\u0438\u0446\u0435\u0439 \u0438 \u043a\u0438\u0440\u0438\u043b\u043b\u0438\u0446\u0435\u0439, \u043e\u043d\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u043b\u044e\u0431\u044b\u0435 \u044f\u0437\u044b\u043a\u0438 \u043c\u0438\u0440\u0430.<\/p>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0431\u043e\u0440\u044c\u0431\u0430 \u0441 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430\u043c\u0438 \u0431\u044b\u043b\u0430 \u0441\u0430\u043c\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432. \u041e \u043d\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u2014 \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u044d\u0442\u043e \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \ud83d\ude42 <\/p>\n<h2>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u041e\u0421<\/h2>\n<p>  \u0424\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 Windows \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043b\u0438\u0447\u0438\u0439 \u043e\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0424\u0421 UNIX-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c:  <\/p>\n<ol>\n<li>\u041e\u043d\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0430\u044f<\/li>\n<li>\u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0441\u0438\u043c\u0432\u043e\u043b \u00ab\\\u00bb \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u043f\u0443\u0442\u0438<\/li>\n<\/ol>\n<p>  \u041a \u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442?<br \/>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u00abFiLe.H\u00bb, \u0430 \u0432 \u043a\u043e\u0434\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u00ab#include &lt;myfolder\\file.h&gt;\u00bb. \u0412 Windows \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0430 \u0432 Linux \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443, \u0447\u0442\u043e \u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u00abmyfolder\\file.h\u00bb \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.<\/p>\n<p>  \u041d\u043e, \u043a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435) \u0438 \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u0445, \u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439 \u043f\u0443\u0442\u0435\u0439 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u00ab\/\u00bb (Windows \u0435\u0433\u043e \u0442\u043e\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442).<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0430\u0434\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u043c\u044b \u043f\u043e\u0432\u0435\u0441\u0438\u043b\u0438 \u043d\u0430 \u0441\u0432\u043e\u0438 git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 hook, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 include-\u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432 \u044d\u0442\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0424\u0421 \u0432\u043b\u0438\u044f\u044e\u0442 \u0438 \u043d\u0430 \u0441\u0430\u043c\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,<\/p>\n<pre><code class=\"cpp\">std::string root_path = get_some_path(); std::string path = root_path + '\\' + fname;<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u00ab\u043a\u043b\u0435\u0438\u0442\u00bb \u043f\u0443\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u0438 \u0441\u0442\u0440\u043e\u043a \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u00ab\\\u00bb \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439, \u0442\u043e \u043e\u043d \u0441\u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0434 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u041e\u0421 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u044f\u0442 \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u0438\u043c\u0435\u043d\u0438 \u0444\u0430\u0439\u043b\u0430.<\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c &#8216;\/&#8217;, \u043d\u043e \u0432 Windows \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435\u043a\u0440\u0430\u0441\u0438\u0432\u043e, \u0434\u0430 \u0438 \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0442 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439, \u0447\u0442\u043e \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u0442\u0441\u044f \u041e\u0421, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0438\u043d\u043e\u0439 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 boost::filesystem. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043f\u043e\u0434 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443:<\/p>\n<pre><code class=\"cpp\">boost::filesystem::path root_path = get_some_path(); boost::filesystem::path path = root_path \/ fname;<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u041f\u041e \u043d\u0430 \u0421++ \u2014 \u044d\u0442\u043e \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430. \u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445, \u043d\u0435 \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0438\u043b\u0438\u0439, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0414\u0430 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0421++ \u043a\u0440\u0443\u043f\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u0435\u0440\u0435\u0442\u0441\u044f \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435 \u043f\u043e\u0434 \u043b\u044e\u0431\u0443\u044e \u041e\u0421 \u0438 \u043f\u043e\u0434 \u043b\u044e\u0431\u043e\u0435 \u0436\u0435\u043b\u0435\u0437\u043e, \u043d\u0435\u043b\u044c\u0437\u044f, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0421++ \u2014 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 \u044f\u0437\u044b\u043a. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u044f\u0434\u0430 \u043f\u0440\u0430\u0432\u0438\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0432\u043a\u0440\u0430\u0442\u0446\u0435 \u0438\u0437\u043b\u043e\u0436\u0438\u043b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u0442\u043e \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u0441\u0435\u0445 \u043d\u0443\u0436\u043d\u044b\u0445 \u0432\u0430\u043c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445. \u0414\u0430 \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u044d\u0442\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043f\u043e\u0434 \u043d\u043e\u0432\u0443\u044e \u041e\u0421 \u0438\u043b\u0438 \u0436\u0435\u043b\u0435\u0437\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0436\u0435 \u043d\u0435 \u0442\u0430\u043a \u0442\u0440\u0443\u0434\u043d\u043e.<\/p>\n<p>  \u0418\u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0443\u0436\u043d\u043e:  <\/p>\n<ul>\n<li>\u0425\u043e\u0440\u043e\u0448\u043e \u0437\u043d\u0430\u0442\u044c \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0421++, \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0435\u043c, \u0430 \u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438\u043b\u0438 \u0432\u043e\u0432\u0441\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a undefined behavior<\/li>\n<li>\u041e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f API \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u043a\u043e\u0434\u0435, \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0438\u043b\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438<\/li>\n<li>\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u0435 \u0437\u0430\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0442\u0438\u043f\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0421++. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f\u044b \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0421++<\/li>\n<li>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0422\u0443\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c UTF-8, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445, \u0438\u043b\u0438 \u0432\u043e\u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u00ab\u0448\u0438\u0440\u043e\u043a\u0438\u0435\u00bb \u0441\u0442\u0440\u043e\u043a\u0438, \u0430\u0431\u0441\u0442\u0440\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u043e\u0442 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a \u0432\u043e\u0432\u0441\u0435<\/li>\n<li>\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u041e\u0421 (\u043a\u0430\u043a \u0432 \u043a\u043e\u0434\u0435, \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430\u0445 #include, \u0442\u0430\u043a \u0438 \u0432 \u043b\u043e\u0433\u0438\u043a\u0435 \u0441\u0430\u043c\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b).<\/li>\n<\/ul>\n<p>  <b>\u0410\u0432\u0442\u043e\u0440: \u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u041a\u043e\u043d\u043e\u0432\u0430\u043b\u043e\u0432<\/b><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/326856\/\"> https:\/\/habrahabr.ru\/post\/326856\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u0442\u043e-\u0442\u043e, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u0441\u043f\u0440\u043e\u0441\u0438\u0442: \u00ab\u0417\u0430\u0447\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u043a\u043e\u0434\u043e\u043c?! \u0412\u0435\u0434\u044c \u0421++ \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 \u044f\u0437\u044b\u043a!\u00bb. \u0412 \u0446\u0435\u043b\u043e\u043c, \u044d\u0442\u043e \u0442\u0430\u043a\u2026 \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043a\u0430 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435\u0442 \u0437\u0430\u0432\u044f\u0437\u043e\u043a \u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b\u2026<\/p>\n<p>  \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438, \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443, \u0440\u0435\u0434\u043a\u043e \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u00ab\u0410 \u0442\u043e\u0447\u043d\u043e \u043b\u0438 \u044d\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u0421++? \u0410 \u0432\u0434\u0440\u0443\u0433 \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043c\u043e\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u00bb. \u041e\u043d\u0438 \u043f\u0438\u0448\u0443\u0442 \u043a\u043e\u0434, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u0441\u0431\u043e\u0440\u043a\u0443 \u0438 \u0447\u0438\u043d\u044f\u0442 \u043c\u0435\u0441\u0442\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0440\u0443\u0433\u0430\u043b\u0441\u044f \u0438\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440. <br \/>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435, \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u00ab\u0437\u0430\u0442\u043e\u0447\u0435\u043d\u043e\u00bb \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 (\u0438 \u0434\u0430\u0436\u0435 \u043f\u043e\u0434 \u0435\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e!) \u0438 \u0446\u0435\u043b\u0435\u0432\u0443\u044e \u041e\u0421. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0438\u0437-\u0437\u0430 \u0441\u043a\u0443\u0434\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0421++ \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0435\u0449\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c, \u043d\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u043c API \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>  \u0422\u0430\u043a \u0431\u044b\u043b\u043e \u0438 \u0443 \u043d\u0430\u0441 \u0432 \u0422\u0435\u043d\u0437\u043e\u0440\u0435. \u041c\u044b \u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430 MS Visual Studio 2010. \u041d\u0430\u0448\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u0431\u044b\u043b\u0438 32-\u0445 \u0431\u0438\u0442\u043d\u044b\u043c\u0438 Windows-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u0418, \u0441\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439, \u043a\u043e\u0434 \u0431\u044b\u043b \u043f\u0440\u043e\u043d\u0438\u0437\u0430\u043d \u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438 \u0437\u0430\u0432\u044f\u0437\u043a\u0430\u043c\u0438 \u043d\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043e\u0442 Microsoft. \u041e\u0434\u043d\u0430\u0436\u0434\u044b \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u043f\u043e\u0440\u0430 \u043e\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u044b: \u043f\u043e\u0440\u0430 \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u0421\u0411\u0418\u0421 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u0434 Linux \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u041e\u0421, \u043f\u043e\u0440\u0430 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u00ab\u0436\u0435\u043b\u0435\u0437\u043e\u00bb (POWER).<\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u043c\u0438 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438; \u043a\u0430\u043a \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 Linux, MacOS \u0438 \u0434\u0430\u0436\u0435 \u043f\u043e\u0434 iOS \u0438 Android; \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0441\u0432\u043e\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 (x86-64, POWER, ARM \u0438 \u0434\u0440\u0443\u0433\u0438\u0435); \u043a\u0430\u043a \u043d\u0430\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 big-endian \u043c\u0430\u0448\u0438\u043d\u0430\u0445.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/061\/63c\/d9b\/06163cd9b2474cc4bb5b9e4a2258e022.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-285198","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/285198","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=285198"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/285198\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=285198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=285198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=285198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}