Horje
how to sort a string alphabetically in c++ Code Example
how to sort a string in c++
#include<bits/stdc++.h>
using namespace std;
int main()
{
	srting str; // First, declare a string.
  	sort(str.begin() , str.end()); // Then sort it by using this method. It is much more convenient.
  	cout << str << endl; // Last of all, print out the string.
}
how to sort a string alphabetically in c++
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
sort(s.begin(),s.end());
cout<<s<<endl;
}




Cpp

Related
c++ require keyword Code Example c++ require keyword Code Example
varint index Code Example varint index Code Example
empty 2d array as a member of a class class c++ Code Example empty 2d array as a member of a class class c++ Code Example
how to call subclass override method in c++ Code Example how to call subclass override method in c++ Code Example
math in section title latex Code Example math in section title latex Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
6