C++ Vector pop_back()It deletes the last element and reduces the size of the vector by one. SyntaxConsider a vector v.Syntax would be: ParameterIt does not contain any parameter. Return valueIt does not return any value. The following illustration show how pop_back() function works : ![]() This illustration shows how last element of the vector is deleted using pop_back() function. ExampleLet's see a simple example. Output: Initial string is :welcome to javaTpoint tutorial After deleting last string, string is :welcome to javaTpoint In this example, last string is being removed using pop_back() 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