Posts

Showing posts from October 25, 2018

Can we increase the iterator without the function? C++11

Image
Clash Royale CLAN TAG #URR8PPP up vote 6 down vote favorite 1 I know we can use advance() function to increment the iterator. We also use iterator++ to increase the iterator by one position. Why we cannot use it+=2? int main() list<int> l11, 2, 3, 5, 6; list<int> l22, 6, 8; auto it = l1.begin(); advance(it, 2); //works it++; //works // it+=2; //not work l2.splice(l2.begin(), l1, it); for(int a: l2) cout<<a<<" "; cout<<endl; return 0; You can run the above code here c++ c++11 iterator listiterator share | improve this question asked 29 mins ago Lusha Li 49 1 4 List has a bidirectional iterator, not a random access iterator. advance uses compile time machinery to optimize advance operation for different kinds of iterators. – William Lee 24 mins ago add a comment  |  up vote 6 down vote favorite 1 I know we can use...

Plural genitive in 1st and 2nd declension - how were mixed genders treated?

Image
Clash Royale CLAN TAG #URR8PPP up vote 1 down vote favorite Genitive plural personal nouns in 1st and 2nd declension: I am wondering how human possessors of mixed gender were treated in ancient Latin. For example, how would the following possessive be translated: 'This is the home of Mr and Mrs Catullus (i.e. of the Catulluses )? I suspect that the Romans would have used the masculine ending. genetivus share | improve this question asked 5 hours ago K Wilson 6 1 New contributor K Wilson is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. add a comment  |  up vote 1 down vote favorite Genitive plural personal nouns in 1st and 2nd declension: I am wondering how human possessors of mixed gender were treated in ancient Latin. For example, how would the following possessive be translated: 'This is the home of Mr and Mr...