{"action":"created","issue":{"url":"https://api.github.com/repos/RattleInGlasses/ps_oop/issues/1","labels_url":"https://api.github.com/repos/RattleInGlasses/ps_oop/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/RattleInGlasses/ps_oop/issues/1/comments","events_url":"https://api.github.com/repos/RattleInGlasses/ps_oop/issues/1/events","html_url":"https://github.com/RattleInGlasses/ps_oop/issues/1","id":94884825,"number":1,"title":"Замечания по программе Replace","user":{"login":"alexey-malov","id":6040682,"avatar_url":"https://avatars.githubusercontent.com/u/6040682?v=3","gravatar_id":"","url":"https://api.github.com/users/alexey-malov","html_url":"https://github.com/alexey-malov","followers_url":"https://api.github.com/users/alexey-malov/followers","following_url":"https://api.github.com/users/alexey-malov/following{/other_user}","gists_url":"https://api.github.com/users/alexey-malov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey-malov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey-malov/subscriptions","organizations_url":"https://api.github.com/users/alexey-malov/orgs","repos_url":"https://api.github.com/users/alexey-malov/repos","events_url":"https://api.github.com/users/alexey-malov/events{/privacy}","received_events_url":"https://api.github.com/users/alexey-malov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-14T07:29:20Z","updated_at":"2015-07-14T07:35:21Z","closed_at":null,"body":"```c++\r\n//return 0 if str1 == str2\r\n//return 1 if str1 != str2\r\nint StrCompare(char *pStr1, char *pStr2)\r\n```\r\nЛучше использовать для таких случаев тип bool и функции дать имя, отвечающее на вопрос \"Да\" или \"Нет\", "},"comment":{"url":"https://api.github.com/repos/RattleInGlasses/ps_oop/issues/comments/121153446","html_url":"https://github.com/RattleInGlasses/ps_oop/issues/1#issuecomment-121153446","issue_url":"https://api.github.com/repos/RattleInGlasses/ps_oop/issues/1","id":121153446,"user":{"login":"alexey-malov","id":6040682,"avatar_url":"https://avatars.githubusercontent.com/u/6040682?v=3","gravatar_id":"","url":"https://api.github.com/users/alexey-malov","html_url":"https://github.com/alexey-malov","followers_url":"https://api.github.com/users/alexey-malov/followers","following_url":"https://api.github.com/users/alexey-malov/following{/other_user}","gists_url":"https://api.github.com/users/alexey-malov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey-malov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey-malov/subscriptions","organizations_url":"https://api.github.com/users/alexey-malov/orgs","repos_url":"https://api.github.com/users/alexey-malov/repos","events_url":"https://api.github.com/users/alexey-malov/events{/privacy}","received_events_url":"https://api.github.com/users/alexey-malov/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T07:35:21Z","updated_at":"2015-07-14T07:35:21Z","body":"```c++\r\nbool ByteReplace(FILE *pInput, char *const pSearchStr, char *const pReplaceStr, FILE *const pOutput)\r\n{\r\n\tsigned int buffSize = StrLen(pSearchStr) + 1;\r\n\tif (buffSize == 0)\r\n\t{\r\n\t\t//error\r\n\t\treturn true;\r\n\t}\r\n\r\n       ...\r\n\r\n\tfree(pStrBuff);\r\n\treturn false;\r\n}\r\n```\r\nВ случае успеха функции обычно возвращают true, а при неуспехе - false.\r\n\r\nТакое код читается естественнее:\r\n```c++\r\nif (CopyFile(..., ...))\r\n{\r\n    DoSomething();\r\n}\r\n```\r\nчем:\r\nif (!CopyFile(..., ...))  // Читается как: если не удалось скопировать файл, то сделай что-то\r\n{\r\n    DoSomething();\r\n}"}}