I have a algorithm bulit but I have errors and don't know why I am getting them.I get the errorsCode:#include <iostream>
#include <string>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <vector>
using namespace std;
typedef std::vector <std::string> StringArray;
int main()
{
cout << "This program is a database for storing information." << endl;
ofstream myfile;
myfile. open ("data.txt", ios::app);
cout << "Please input what you want to store." << endl;
StringArray s;
std::string inString;
for (int i = 0, i < 5; i++ ;); /// line 17
s.push_back(inString);
{ getline (cin, inString);
myfile << inString << endl;
}
sort (s.begin(), s.end(), greater<int>());
myfile. close ();
system("pause");
return 0;
}
In function `int main()':|
|17|error: expected init-declarator before '<' token|
|17|error: expected `,' or `;' before '<' token|
stl_algo.h|2319|error: no match for call to `(std::greater<int>) (std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'|
C:\MinGW\include\c++\3.4.2\bits\stl_function.h|218|note: candidates are: bool std::greater<_Tp>:: operator()(const _Tp&, const _Tp&) const [with _Tp = int]|
stl_algo.h||In function `const _Tp& std::__median(const _Tp&, const _Tp&, const _Tp&, _Compare) [with _Tp = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, _Compare = std::greater<int>]':|
stl_algo.h|124|error: no match for call to `(std::greater<int>) (const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'|
stl_algo.h|125|error: no match for call to `(std::greater<int>) (const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'|
stl_algo.h|127|error: no match for call to `(std::greater<int>) (const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'|
stl_algo.h|131|error: no match for call to `(std::greater<int>) (const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'|
stl_algo.h|133|error: no match for call to `(std::greater<int>) (const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'|
stl_algo.h|2041|error: no match for call to `(std::greater<int>) (std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'|
stl_algo.h|2044|error: no match for call to `(std::greater<int>) (std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'|
stl_algo.h|2145|error: no match for call to `(std::greater<int>) (std::string&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
stl_algo.h|2093|error: no match for call to `(std::greater<int>) (std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'|
stl_heap.h|279|error: no match for call to `(std::greater<int>) (std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'|
stl_heap.h|166|error: no match for call to `(std::greater<int>) (std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'|
What is going on here? I've been researching this for a couple days and can't figure out whats going wrong.

