Hello!
How can i find minimal and maximal element in list?
I think i must start with function for sorting but how to put in dynamic initialization without STL?
?
*max_element will not directly work on my code above. but i said
afaik
because there could be complicated ways to make it work, that i don't know.
also there are STL containers such as list(doubly linked list) & forward_list(singly linked list).
If you write a linked list, then you can write a helper iterator for it too.
That is no more complicated than writing the list. In fact, having the iterator might
simplify the code of some list operations.
The obvious reason to write a linked list is to practice programming and writing both a list and an iterator for it is surely "better practice"?
Did I miss something? Let me explain:
I translated Anup's reply 'no afaik' as "No, as far as I know." My reaction to this was 'hard cheese', what I meant as "what a pity" or "bad luck" or "hard lines" or "too bad".
And (for me still a C++ novice) it is too bad in two ways: i) if there really isn't something like *max_element(ar,ar+6) for linked lists, and ii) if there is something similar but stays unknown, what shows a poor documentation, or at least one not helpful for "fast forward" to get results ASAP.
I think there's some weird stuff being lost in translation here.