Dictionary Order - How do i print the result in lexicographical order?

What is the max no of strings I can store in an array of strings, as max length required for this question is (25!) ?

#include<bits/stdc++.h>
using namespace std;

void perDict(string in, int i, string ori){
if(in[i]==’\0’){
if(in.compare(ori)>0)
cout<<in<<"\n";
return;
}

for(int j=i; in[j]!='\0'; j++){
		swap(in[i], in[j]);
		perDict(in, i+1, ori);
		swap(in[i], in[j]);
}
return;

}
int main() {
string in;
cin>>in;
string ori = in;
sort(in.begin(), in.end());
perDict(in, 0, ori);
return 0;
}

hello @alien,
u can store 10^8/25 strings in an array.
btw use vector in place array. it will handle size on its own

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.