{"author_name":"itog","image_url":null,"author_url":"https://blog.hatena.ne.jp/itog/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fitog.hatenadiary.org%2Fentry%2F20090310%2F1236672671\" title=\"int\u3092string\u306b\u5909\u63db - Hacking My Way \u301c itog\u306ehack\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2009-03-10 17:11:11","type":"rich","title":"int\u3092string\u306b\u5909\u63db","categories":["C/C++"],"url":"https://itog.hatenadiary.org/entry/20090310/1236672671","version":"1.0","provider_url":"https://hatena.blog","blog_title":"Hacking My Way \u301c itog\u306ehack\u65e5\u8a18","provider_name":"Hatena Blog","description":"int\u3067\u6e21\u3055\u308c\u305f10\u9032\u6570\u306e\u5024\u3092string\u306b\u5909\u63db\u3059\u308b\u306b\u306fsprintf\u3092\u4f7f\u3046\u65b9\u6cd5\u3068stringstream\u3092\u4f7f\u3046\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002 sprintf\u3092\u4f7f\u3046\u65b9\u6cd5 C\u3001\u7d44\u307f\u8fbc\u307fC++\u306e\u5834\u5408\u306fsprintf\u3092\u4f7f\u3063\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u3051\u307e\u3059\u3002\u547c\u3073\u51fa\u3057\u5074\u3067\u30d0\u30c3\u30d5\u30a1\u3092\u78ba\u4fdd\u3057\u3066\u3082\u3089\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 void IntToString(char *str, int number) { sprintf(str, \"%d\", number); } \u4f7f\u7528\u4f8b #include <stdio.h> int main() { int iNum = 100; char sNum[32]; IntToString(sNum, iNu\u2026","height":"190","width":"100%","blog_url":"https://itog.hatenadiary.org/"}