• 全部
  • 问答

Who can help solve a string copy problem with list?

djwinter 2006-08-18 08:33:45
I can not type chinese now, so use english instead

list <std::string A>
list <std::string B>

we have sucessfully read a file into A, for example,
stream a like : 1 2 3 4 5 6 7 8

now I want to copy "2 3 4" to B, how can I apply this?
...全文
117 点赞 收藏 4
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
djwinter 2006-08-18
thanks a lot, is there any reference to find out the STL functions, to be honest, I have not idea about what function it is got.
回复
jiaowenhao 2006-08-18
where are you from?
回复
OpenHero 2006-08-18
very well
回复
ddstudent 2006-08-18
list <string> A;
list <string> B;

B.assign(iteratorA_start, iteratorA_end);

which iteratorA_start is the iterator of element 2 in A and iteratorA_end is the iterator of element 4 in A
回复
相关推荐
C++编程思想 第2卷 第4章 输入输出流 字符串输入输出流 输出字符串流
为了创建输出字符串流,...为了将输出结果格式化为string对象,可以调用成员函数str() //: C04:Ostring.cpp {RunByHand} // From "Thinking in C++, Volume 2", by Bruce Eckel &amp; Chuck Allis...
【C++】EASTL: 抛弃C++ STL的开源STL
EASTL -- Electronic Arts Standard Template Library...http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2007/n2271.html Document number: N2271=07-0131 Date: 2007-04-27 Reply to: Paul Ped...
如何实现STL样式的迭代器并避免常见的陷阱?
I made a collection for which I want to provide an STL-style, random-access iterator. 我制作了一个集合,希望为其
YouCompleteMe: a code-completion engine for Vim
Intro Installation Mac OS X Ubuntu Linux x64 Fedora Linux x64 Windows FreeBSD/OpenBSD Full Installation Guide Quick Feature Summary User Guide ...Client-Server Archi...
源于Design Pattern Explanation with C++ Implementation的 设计模式 C++
1、单例模式(Singleton Pattern ) 2、抽象工厂模式(Abstract Factory Pattern ) 3、工厂方法模式(Factory Method Pattern ) 4、简单工厂模式(Simple Factory Pattern ) 5、建造者模式(Builder Pattern ) ...
EASTL -- Electronic Arts Standard Template Library
Document number:  N2271=07-0131 Date: 2007-04-27 Reply to: Paul Pedriana Electronic Arts ppedriana at ea.com EASTL -- Electronic Arts Standard Template Library ...
哈尔滨学院夏令营day6:训练赛2
A - Rightmost Digit Given a positive integer N, you should output the most right digit of N^N. Input The input contains several test cases. The first line of the input is a single integer T which is ...
湖南大学第十四届ACM程序设计新生杯(重现赛)a+b+c+d=?
a+b+c+d=? 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K ...This is a very simple problem! Your only job is to calculate a + b + c + d! 输入描述: There are several cases. ...
comp.lang.c Answers to Frequently Asked Questions (FAQ List)
From: scs@eskimo.com (Steve Summit)Newsgroups: comp.lang.c, comp.lang.c.moderatedSubject: comp.lang.c Answers to Frequently Asked Questions (FAQ List)Date: 1 Nov 2008 10:00:10 GMTMessage-ID:
Bjarne Stroustrup's C++ Style and Technique FAQ
Bjarne Stroustrup's C++ Style and Technique FAQModified October 4, 2009Source: http://www2.research.att.com/~bs/bs_faq2....
C++ Object Persistence with ODB
source: http://www.codesynthesis.com/products/odb/doc/manual.xhtml#16 C++ Object Persistence with ODB Copyright © 2009-2013 Code Synthesis Tools CC ...Permission is granted to copy, distribute
C++编程思想 第2卷 第3章 深入理解字符串 字符串的查找 从字符串中删除字符
使用erase()成员函数删除字符串中的字符是简单而有效的 //: C03:HTMLStripper.cpp {RunByHand} // From "Thinking in C++, Volume 2", by Bruce Eckel &amp; Chuck Allison. // (c) 1995-2004 ...
MPFC++ wrapper by Pavel
这个工具非常不错。把超过double的高精度计算在C++中的实现变得方便容易了。 mpir, mpfr, mpf, eigen C++ template library http://www.holoborodko.com/pavel/mpfr/ Pavel Holoborodko ...
Google C++ Style Guide
Google C++ Style Guide http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml Google C++ Style Guide Revision 3.180 Benjy We
leetcode笔记—Hash Table
1. Two Sum (easy) ...problem View Code 3. Longest SubstrWithout Repeating Characters (medium) 最长的无重复的子字符串 problem View Code 18. 4Sum (medium) 找到所有和为target的四元...
hhh
Accelerated C++ Practical Programming by Example by Andrew Koenig and Barbara E. Moo Addison-Wesley, 2000 ISBN 0-201-70353-X Pages 336 Second Printing Table of Contents ...Chapter 0 Get
lzw reviesited
为什么80%的码农都做不了架构师?>>> ...
Generic Programming: Mappings between Types and Values (转)
Generic Programming: Mappings between Types and Values (转)[@more@]XML:namespace prefix = o ns = "urn:schemas-micro...
Mashal Description
IntroductionThe Common Language Infrastructure (CLI) is designed to make it "easy" to interoperate with existing code. In principal, all you need to do is create a DllImport function declaration f
[转]wxWidgest: 编程风格指导
http://www.wxwidgets.org/develop/standard.htm#no_ternarywithobjects   --------------------------------------------------------------- Pro
From C++ to Objective-C
FromC++ to Objective-C version2.1 en PierreChatelier e-mail:pierre.chatelier@club-internet.fr Copyrightc 2005, 2006, 2007, 2008, 2009 Pierre Chatelier Englishadaptation : Aaron Vegh Documentrevi
C# Marshaling
IntroductionThe Common Language Infrastructure (CLI) is designed to make it "easy" to interoperate with existing code. In principal, all you need to do is create a DllImport function declaration f
stl粗浅总结
最近把放假欠的stl的题目补完了,现在通过题目做一个总结。...放链接http://codeforces.com/problemset/problem/612/CC. Replace To Make Regular Bracket Sequencetime limit per test1 secondmemory limit p...
(英文)关于Unity3d c#和.a\.o\.so等native库文件的交互,库文件可以由c\c++\object-c等编译
Interop with Native Libraries  Edit page on GitHub Introduction The Common Language Infrastructure (CLI) is designed to mak
Generic Programming: Mappings between Types and Values
Generic: Mappings between Types and ValuesAndrei Alexandrescu前言 Andrei Alexandrescu的文章不用我说了吧,经典!由于小弟水平有限,不敢翻译,恐有误人子弟之嫌,好了大家还是赶快看吧。...
vue-devtools chrome 插件
chrome(谷歌浏览器)vue代码调试插件, 已打包。解压后,通过chrome扩展程序加载即可使用。 使用方法: 1、chrome浏览器输入地址“chrome://extensions/”进入扩展程序页面 2、勾选开发者模式 3、点击“加载已解压的扩展程序...”按钮,选择解压后的chrome文件夹,即可添加成功。 4、添加完vue-devtools扩展程序之后,我们在调试vue应用的时候,ch rome开发者工具中会看一个vue的一栏,点击之后就可以看见当前页面vue对象的一些信息
名师精讲CSS3
CSS3即层叠样式表(Cascading Style Sheet), 在网页制作时采用层叠样式表技术,可以有效地对页面的布局、字体、颜色、背景和其它效果实现更加精确的控制。只要对相应的代码做一些简单的修改,就可以改变同一页面的不同部分,或者页数不同的网页的外观和格式。 本课程讲述了CSS3的实战应用,包括对网页修改以及对页面的布局、字体、颜色、背景和其它效果实现更加精确的控制。 通过本课程的学习,学者将可实现基本网页修改与美化,掌握CSS3对网页修改以及对页面的布局、字体、颜色、背景和其它效果实现更加精确的控制,并逐步达到熟练使用CSS3的学习效果,为自己的职场能力添砖加瓦。
《UML面向对象需求分析与建模教程》 邹盛荣 主编 电子版 2016.01 .doc
PPT已在CSDN均可免费下载 《UML面向对象需求分析与建模教程》 邹盛荣 主编 电子版 2016.01 .doc 当当网上可购买纸质书: http://product.dangdang.com/23766413.html
STM32F407 / F103 PCF8575模块 控制16个I/O口 IIC通信
本例程为STM32F407控制PCF8575模块的16个I/O口输出,本例程基于正点原子STM32F407 IIC例程修改,本例程中使用PCF8575控制16个继电器。
比较两张图片差异
比较两张图片差异,代码收集于网上,码收集于网上
发帖
C++ 语言
创建于2007-09-28

5.9w+

社区成员

C++ 语言相关问题讨论,技术干货分享,前沿动态等
申请成为版主
帖子事件
创建了帖子
2006-08-18 08:33
社区公告
暂无公告