I have a bunch of strings that I need to sort. I think a std::vector would be the easiest way to do this. However, I\'ve never used vectors before and so would like some help.>
Try using comaprator:
#include
#include
#include
#include
#include
using namespace std;
//comparing function only sorts if string size is equal and keeps the larger integgers at last.
bool myfunction (string i,string j)
{
int n=i.length();
int m=j.length();
if(n==m)
return (i>n;
vector arr(n);
for(int i=0;i>arr[i];
sort(arr.begin(),arr.end(),myfunction);
for(int i=0;i