Thursday, October 22, 2015

Introduction to STL
STL (Standard Template Library) is a set of functions and classes (types of objects.’ll Deeper lectures explained later) to reduce the work in programming. Let’s deal with one of the most used types STL, vectors.


vectors
Vector class defines a type of container given by STL. Can we describe as a dynamic array, an array that can change the size as needed. This class also contains functions to manipulate the array elements. So, a vector has all the functionality of an array and more.
Consider some of the advantages and disadvantages of vectors to arrayve

ADVANTAGES:
Vectors, unlike the array can be expanded in size. If you use a vector to hold objects in a program, expand the array will keep the number of objects that can be added later. If you use the array, you need to create an array with predetermined size, and if the execution of the program you need more space on the array, you would not get.
Vectors can be used with the functions of STL, while the array not. So using vectors will have finished more complex functionality like search or listing. If you use the array, you’ll need to write the code itself for the same functionality.
disadvantages:
Vectors require slightly more memory.
There may be a small cost in performance when expanding array.

Lesson 11 – Introduction to STL, vectors.

  • Uploaded by: Unknown
  • Views:
  • Category:
  • Share

    0 comments:

    Post a Comment

     

    Our Team Members

    Original Theme 2015 VIDEO- | Designed by EmcCadch3