+ 2
Can you cover all the important STL functions in this answer with examples?
It would be very kind of you if you could.cover all the important standard template library builtins in a single answer here.I require only the important ones.if you feel the answer will be too huge please provide relevant source.Thanks in advance.
1 Answer
0
if im not mistaken stl has things like vectors, stacks, queues, hash maps, ect. these are important data structures within any programming language.
each of these have a specific set of rules that they need to follow in order for them to be what they are. ex: stack must be "last in first out" where as a queue must be "first in first out".
each of these also have specific member functions that they Need in order to function properly. they also must operate according to their rules.the most common functions are
push/enqueue
pop/dequeue
makeEmpty
isEmpty
peek
and maybe a print function.
these templates are here so you can use them if you feel like it. vectors are the most common
(I have a 2D vector program. go check it out)
stl elements are built in data structures so you dont have to build them yourself, using dynamic arrays or linked lists.
--google "containers c++" and go to c++ references for more information.
hope this helps!!