main.cpp

来自「Design Componenet With C++ STL配套书源代码」· C++ 代码 · 共 26 行

CPP
26
字号
// k3/list/identify/main.cpp#include<fstream>#include<list>#include"identif.h"int main( ) {    // define and open input file    std::ifstream Source("main.cpp");    std::list<Identifier> Identifier_list;    std::istream_iterator<Identifier> iPos(Source), end;    if(iPos == end)       std::cout << "File not found!" << std::endl;    else       while(iPos != end)          // insert identifier and read next one          Identifier_list.push_back(*iPos++);    // output    std::list<Identifier>::const_iterator I = Identifier_list.begin();    while(I != Identifier_list.end())         std::cout << *I++ << std::endl;}

⌨️ 快捷键说明

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