Skip to content

Latest commit

 

History

History
executable file
·
37 lines (26 loc) · 873 Bytes

File metadata and controls

executable file
·
37 lines (26 loc) · 873 Bytes

Headers and their uses.

  • <limits.h> - INT_MIN, INT_MAX
  • <math>/<cmath> - min(), max()
  • <vector> - Able to use vector STL
  • b

In-Built Functions (from Standard Template std::)

Array

  • sizeof(arr) - tells size of array in binary Eg. arr[5]. sizeif(arr) will be 20; 5*4bytes=20bytes
  • addressof(arr)
  • reverse(arr, arr+size) - Reverses array without new array creation
  • dsad

Vector Array

  • reverse(arr.begin(),arr.end()) - Reverses array without new array creation

Member Functions

Array

  • dasd

Vector Array

  • .size() - Eg. arr.size()
  • .push_back()
  • .pop_back() - pops/ removes element from behind
  • .clear() - Eg. arr.clear()
  • .at(index) - Use to show value at index, alternative: arr[i] mostly used.
  • .front() - Equivalent to arr[0]
  • .back() - Equivalent to arr[arr.size()-1]