#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <list>
#include <string>

bool str_num_cmp(const std::string& s1, const std::string& s2)
{
	return atoi(s1.c_str()) < atoi(s2.c_str()) ? true : false;
}

void show_list(const std::list<std::string> lst)
{
	for (std::list<std::string>::const_iterator it = lst.begin();
	     it != lst.end();
	     it++)
		std::cout << it->c_str() << " " << std::endl;
}

int main(void)
{
	char *arr[] = {
		"324", "2133", "938", "202", "199", "200"

	};
	std::list<std::string> lst;

	for (size_t i = 0, max_i = sizeof(arr) / sizeof(char *); i < max_i; i++)
		lst.push_back(arr[i]);

	std::cout << "Not sorted:" << std::endl;
	show_list(lst);

	lst.sort();
	
	std::cout << "Standart sorted:" << std::endl;
	show_list(lst);

	lst.sort(str_num_cmp);

	std::cout << "str_num_cmp  sorted:" << std::endl;
	show_list(lst);

	return EXIT_SUCCESS;
}

