i want to write a c++(console) programme for a voting system that accepts names of candidates and the votes they had and sort these votes in descending order to show the winner. how do i go about it. thanks.
this is the what i have been able to do so far.
#include <isotream.h>
char names[5][5]; // five names of candidates and 5 constitutes
cout<<"enter the names"<<endl;
for (int m=0; m<5; m++)
{
cin>>names[m];
}