{"categories":["C++"],"blog_title":"\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u7684\u611b\u60c5","url":"https://blog.emattsan.org/entry/2018/02/10/194905","height":"190","provider_url":"https://hatena.blog","width":"100%","author_name":"E_Mattsan","author_url":"https://blog.hatena.ne.jp/E_Mattsan/","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.emattsan.org%2Fentry%2F2018%2F02%2F10%2F194905\" title=\"\u6a19\u6e96\u5165\u529b\u3001\u6a19\u6e96\u51fa\u529b\u3001\u6a19\u6e96\u30a8\u30e9\u30fc\u3092\u30b3\u30fc\u30c9\u3067\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b - \u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u7684\u611b\u60c5\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"\u6a19\u6e96\u5165\u529b\u3001\u6a19\u6e96\u51fa\u529b\u3001\u6a19\u6e96\u30a8\u30e9\u30fc\u3092\u30b3\u30fc\u30c9\u3067\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b","description":"cstdio \u3068 iostream \u304c\u6df7\u3056\u3063\u3066\u3044\u308b\u306e\u304c\u5c11\u3005\u5ea7\u308a\u304c\u60aa\u3044\u306e\u3067\u3059\u304c\u3002iostream \u304b\u3089\u30d5\u30a1\u30a4\u30eb\u30c7\u30a3\u30b9\u30af\u30ea\u30d7\u30bf\u3092\u53d6\u5f97\u3067\u304d\u308c\u3070\u3088\u3044\u306e\u3067\u3059\u304c\u4ed5\u69d8\u4e0a\u306f\u4ed5\u7d44\u307f\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u306a\u3044\u3088\u3046\u306a\u306e\u3067\u3001cstdio \u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002 #ifndef REDIRECT_H__ #define REDIRECT_H__ #include <unistd.h> template<int FD> class RedirectT { public: RedirectT(int fd) : dup_fd_(dup(FD)) { dup2(fd, FD); } ~RedirectT() { sync(); dup2\u2026","type":"rich","version":"1.0","published":"2018-02-10 19:49:05","image_url":null,"blog_url":"https://blog.emattsan.org/"}