Hi everybody. I have a problem with sort alphabetically. I have a list of stuctures and I don't know how to sort it. I know how to sort list with function iter_swap but how to sort lsit of structures accordingly to one member. For example alphabetically or by bigger member(int).
Please, just tell a function and i will find out rest by myself.
Also you can define operator<(sWorker &left, sWorker &right) and you can use sort like workers.sort() and almost all standart algorithms (iter_swap...) will work