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
Many modern cryptography algorithms require two numbers that are coprime, or sometimes referred to as relatively prime. Two numbers are coprime if their greatest common divisor is

A: A dangling pointer arises while you use the address of an object after its lifetime is end. It may occur in situations such as returning addresses of automatic variables from a

You must write a program that can both decrypt and encrypt a single word that is entered by the user. The initial choice of encryption and decryption is left up to the user. Addi

Illustrate the Function Definition? The C code that explains what a function does is called the function definition. A function definition has the following form Type fun

overloadstream insertion opertator to display the data of object on the console

I am having trouble declaring a variable and returning a value from my function.


Program of cascading: class vector{                 private :                 int v[3];                   public:                 friend istream & operator >> (

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send