answersLogoWhite

0

#include<iostream>

#include<vector>

#include<string>

#include<algorithm>

int main()

{

std::vector<std::string> str_array = { "John", "Bill", "Alan", "Craig"};

std::sort (arr.begin(), arr.end());

}

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

How can write a c program to store students record in a file?

Write a console based C++ program that reads student information from a text file, build an array of objects of type class StudentInfo,


Could you Write a program for 8086 microprocessor that displays on the monitor the average of 2 numbers from an array?

How to write a program for mouse in microprocessor?


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


How do you write a C Program to fill up an Integer Array?

Reference:cprogramming-bd.com/c_page1.aspx# array programming


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


How do you write a program in C to find and display the sum of each row and column of a 2 dimensional array of type float?

array type


What is the Java program for sorting an array?

Java has a very efficient built in implementation of quick sort. You can use it on any array of primitives or Comparable Objects by invoking Arrays.sort(&lt;array&gt;) See related link.


Write a c program to find the maximum value of 25 element in an array?

int findMax(int *array) { int max = array[0]; for(int i = 1; i &lt; array.length(); i++) { if(array[i] &gt; max) max = array[i] } return max; }


Write a c program to find the maximum of two numbers and print out with its position?

maxValue = function (array) {mxm = array[0];for (i=0; i&lt;array.length; i++) {if (array[i]&gt;mxm) {mxm = array[i];}}return mxm;}; i don't know


Write a c program to reverse an array without using another array?

public static int[] reverseArray(int[] array) { int i = 0, j = array.length - 1; for (i = 0; i &lt; array.length / 2; i++, j--) { int temp = array[i]; array[i] = array[j]; array[j] = temp; } return array; }


Write a program to substrate two matrixs in two dimension array?

You need to specify the language in which you want the subtraction of the two matrix in two dimension array written.


What is an arrangement of objects into equal rows and columns?

Tabulated form of objects