C++ 输入输出流重定向到外设

上传者: besidemyself | 上传时间: 2023-11-02 08:00:38 | 文件大小: 6.77MB | 文件类型: RAR
C++ 标准输入输出模块,为字符流操作提供了便捷的途径,软件开发当中,尤其是嵌入式系统开发当中,有时候需要把流信息重新定向到特定的端口,如串口,以太网,USB等。如标准输入输出cout, cin默认将字符流定向到屏幕或控制台。本代码演示了如何重载streambuf 使得使用ostream 或 istream 将字符流定向到特定的外设的一般思路.以以太网为例.

文件下载

资源详情

[{"title":"( 29 个子文件 6.77MB ) C++ 输入输出流重定向到外设","children":[{"title":"IORedirection","children":[{"title":"IORedirection.v11.suo <span style='color:#111;'> 64.50KB </span>","children":null,"spread":false},{"title":"IORedirection.sln <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"IORedirectSocketServer","children":[{"title":"IORedirectSocketServer.vcxproj <span style='color:#111;'> 4.55KB </span>","children":null,"spread":false},{"title":"stdafx.cpp <span style='color:#111;'> 227B </span>","children":null,"spread":false},{"title":"IORedirectSocketServer.cpp <span style='color:#111;'> 646B </span>","children":null,"spread":false},{"title":"stdafx.h <span style='color:#111;'> 233B </span>","children":null,"spread":false},{"title":"targetver.h <span style='color:#111;'> 236B </span>","children":null,"spread":false},{"title":"IORedirectSocketServer.vcxproj.filters <span style='color:#111;'> 1.50KB </span>","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 1.58KB </span>","children":null,"spread":false}],"spread":true},{"title":"IORedirection.sdf <span style='color:#111;'> 32.50MB </span>","children":null,"spread":false},{"title":"IORedirection","children":[{"title":"stdafx.cpp <span style='color:#111;'> 218B </span>","children":null,"spread":false},{"title":"IORedirection.vcxproj <span style='color:#111;'> 4.66KB </span>","children":null,"spread":false},{"title":"IORedirection.vcxproj.filters <span style='color:#111;'> 1.76KB </span>","children":null,"spread":false},{"title":"StreamSocket.cpp <span style='color:#111;'> 298B </span>","children":null,"spread":false},{"title":"stdafx.h <span style='color:#111;'> 233B </span>","children":null,"spread":false},{"title":"basic_dev_streambuf.h <span style='color:#111;'> 647B </span>","children":null,"spread":false},{"title":"TCPStreambuf.h <span style='color:#111;'> 250B </span>","children":null,"spread":false},{"title":"stream_dev_interface.cpp <span style='color:#111;'> 214B </span>","children":null,"spread":false},{"title":"basic_dev_streambuf.cpp <span style='color:#111;'> 2.23KB </span>","children":null,"spread":false},{"title":"Socket.cpp <span style='color:#111;'> 4.56KB </span>","children":null,"spread":false},{"title":"targetver.h <span style='color:#111;'> 236B </span>","children":null,"spread":false},{"title":"IORedirection.cpp <span style='color:#111;'> 2.21KB </span>","children":null,"spread":false},{"title":"StreamTrace.h <span style='color:#111;'> 227B </span>","children":null,"spread":false},{"title":"StreamTrace.cpp <span style='color:#111;'> 191B </span>","children":null,"spread":false},{"title":"Socket.h <span style='color:#111;'> 1.39KB </span>","children":null,"spread":false},{"title":"stream_dev_interface.h <span style='color:#111;'> 157B </span>","children":null,"spread":false},{"title":"StreamSocket.h <span style='color:#111;'> 297B </span>","children":null,"spread":false},{"title":"TCPStreambuf.cpp <span style='color:#111;'> 137B </span>","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明