473,387 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

I want to know about fucntion template and STL

I was studying about the STL. I am confused in the concept of iterator, container and algorithm in STL. Can any one of you gie me the concept on Function template and STL?
Sep 28 '06 #1
1 1438
D_C
293 100+
I think the basic idea behind using iterators, containers, and algorithms is to simplify things.

For example, consider printing all elements in a vector and the same task for a list. In either case, create an iterator (of type vector or list, respectively). Then, iterate through the elements of each respective container, printing the contents of each element as you go.

In fact, it is so similar, it is entirely possible to have one algorithm which iterates through any type of container, printing the contents of each element, assuming each type of contained element has a method print().
Sep 28 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: lutorm | last post by:
Hi, I'm having a problem with a return statement being parsed to return a function (I think). Check here: template <typename T> class A {}; template <typename T> class maker_of_A { public:...
11
by: Joe | last post by:
Hello All, I have an ASP.NET page with one Textbox (SearchTextBox) and one ImageButton (SearchButton) server controls. The user can type search text in SearchTextBox and click SearchButton and...
15
by: Pucca | last post by:
I'm getting an error when I tried to use this BerConverter class in my C# code. Even though the Interent doc says that it runs on Win2000 sp4, I just thgouth I'll double check. Does anyone know...
4
by: Steven T. Hatton | last post by:
<quote url="http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=53&rl=1"> exported Templates Last updated Sep 6, 2006. exported Templates The separate compilation model enables...
1
by: Haggr via AccessMonster.com | last post by:
"My Fucntion()" will return a string value of lxb114 for a query field with a string of xlb114r. So my question is how to text that Function in the immediate window of the module? Tried...
0
by: k04jg02 | last post by:
Python has a nifty operator that will take a container and pass its elements as function parameters. In Python you can make a list like so: x = Then you can say: f(*x)
2
by: sowmi | last post by:
Hi All, I'm learning Pointers to functions in C.But I have some doubts regardign the same.I would be v.happy and thankful if somebody can help me out on my pbm The problem is mentioned below:...
2
by: mdawg | last post by:
I am attempting to use the XSLT document function to extract the value of an attribute in a secondary XML file. In order to add an image to the generatedHTML Both xml files I am dealing with are...
12
by: mcarthybn | last post by:
hi , I am working on huge C programming project.I am doin debugging only by printf measn i dont have any dubugger .So it is very difficult know who is actually calling a function and i am stuck...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.