阅读背景:

Using Binary I/O with Array-Based Streams

来源:互联网 
 


#include <iostream>
#include <strstream>
using namespace std;
int main()
{
  char *p = "this is a test
 


#include <iostream>
#include <strstream>
using namespace std;
int main()
{
  char *p = "this is a test\1\2\3\4\5\6\7";
  istrstream ins(p);
  char ch;

  while (!ins.eof()) {                       // read and display binary info
    ins.get(ch);
    cout << hex << (int) ch << ' ';
 }
  return 0;
}
 
 


"; istrstream ins(p); char ch; while (!ins.eof()) { // read and display binary info ins.get(ch); cout << hex << (int) ch << ' '; } return 0; } #include <iostream> #include <strstream> us



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: