Standard template library , C/C++ Programming

The STL details are described in many places online (see the CS377 webpage for some links), and there's a very quick introduction in Section A.14. Here are just a few additional notes: Function calls in C++ pass by value, making a copy of the argument. If you need to modify the argument, or if making a copy of a large object would be consume too much time and memory, then passing by reference (a pointer) is often preferable.

Similarly, many of the STL methods (e.g. insert(), etc) are set up to pass potentially large objects by value, rather than by reference. For this reason, one might want to create objects composed of pointers, rather than objects. For example, if you wanted a queue-of-queues, with larger datasets, you'd probably want to use a queue-of-pointers-to-queues instead, such as

queue*> my_queue;

rather than

queue > my_queue;

Posted Date: 3/12/2013 4:01:39 AM | Location : United States







Related Discussions:- Standard template library , Assignment Help, Ask Question on Standard template library , Get Answer, Expert's Help, Standard template library Discussions

Write discussion on Standard template library
Your posts are moderated
Related Questions
Protected derivation In addition to doing private and public derivations, you may also do a protected derivation. In this situation :   The private members inherited

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b


application problem of tower of hanoi

superposition of waves

Question 1 Consider you have to find out average marks of 100 students in a class. Write simple program(s) using different iteration statements to accomplish it Question 2 Expla

Hello, I would like to know if you can help in C programs that work on android.

convert lower case to uper case

Objective of this Program: (a) To learn more about modularization of a program into independent modules, (b) To use arrays in a program, (c) To get some experience with us

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec