Impossible is nothing  
  爱过知情重醉过知酒浓   花开花谢终是空   缘份不停留像春风来又走   女人如花花似梦
公告
日历
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011
统计
  • 随笔 - 8
  • 文章 - 91
  • 评论 - 16
  • 引用 - 0

导航

常用链接

留言簿(4)

随笔分类(4)

随笔档案(8)

文章分类(77)

文章档案(91)

相册

搜索

  •  

最新评论

阅读排行榜

评论排行榜

 
#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <iterator>

#define INPUT_STRING "mallid=310103123456\ntermno=139654785231\norder=00003995\ngcode=0000130\npaydate=20051031\nname=\ncardno=5248000262355365\nlimit=0804\nprice=2210"

typedef std::vector<std::string> strvec;

int main()
{
    using namespace std;

    istringstream iss(INPUT_STRING);
    strvec strList;
    string strTemp;

    while(iss >> strTemp)
    {
        strList.push_back(strTemp);
    }

    // out put the result
    copy(strList.begin(), strList.end(), ostream_iterator<string>(cout, "\n"));

    return 0;
}
posted on 2006-02-27 22:53 笑笑生 阅读(236) 评论(0)  编辑 收藏 引用 所属分类: C++语言

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


 
Copyright © 笑笑生 Powered by: 博客园 模板提供:沪江博客