cout Sort student names in ascending order
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
char Names[5][20];
for(int i =0 ; i <5;i++)
{
cout<<"Enter Your Desire Names: ";
cin>>Names[i];
}
| |
how to sort strings we have not read it yet but lab instructor give us assignment:(
Last edited on
I'd recommend using the powerful Google Search. if you googled for something like "sort strings C++" you'd have answer in no time.
Anyway, either google on how to use std::sort, or google quicksort/mergesort, although these are a bit harder.