⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test-str.cpp

📁 UC Library Extensions UnderC comes with a pocket implementation of the standard C++ libraries, wh
💻 CPP
字号:
#ifdef NO_FAKE
#include <iostream.h>
#include <strstream.h>
#else
#include "iostrm.h"
#endif

const int BUFFSIZE = 128;
char buff[BUFFSIZE];

int main()
{
  ostrstream out(buff,BUFFSIZE);
  out << "hello" << ends;  // MUST have explicit ends (not needed for fake iostreams)
  // at this point buff is 'hello'
  cout << buff << endl;
  out.seekp(0);
  out << "dolly" << ends;
  // shd be "dolly"
  cout << buff << endl;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -