C++ Vector operator()
This function is used to access a specified element.
Consider a vector 'v' and position 'pos'. Syntax would be:
pos: It defines the position of the element.
It returns the element of specified location.
Let's see a simple example.
C C++ java
In this example,each element is accessd using operator() function.
Let's see simple example
1 2 3 4 5
In this example, each element of vector v is accessed using operator () function.
Next TopicC++ Vector
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week