User Tools

Site Tools


cpp:stl:vector

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
cpp:stl:vector [2020/05/27 17:27] – [Διαγραφή των περιεχομένων του πίνακα] gthanoscpp:stl:vector [2020/05/27 17:29] gthanos
Line 81: Line 81:
  
 <WRAP important 80% center round> <WRAP important 80% center round>
-Όταν μία συνάρτηση της STL λαμβάνει ως παραμέτρους δύο //iterators// **first,last** που προσδιορίζουν το εύρος ενός //container//, το διάστημα το οποίο υπολογίζεται είναι πάντα από **first** (συμπεριλαμβανομένου) έως **last** (μη συμπεριλαμβανομένου).+Όταν μία συνάρτηση της STL λαμβάνει ως παραμέτρους δύο //iterators// **first,last** που προσδιορίζουν τμήμα ενός //container// και υποθέτοντας ότι το **first** προηγείται του **last**, το διάστημα το οποίο υπολογίζεται είναι πάντα από **first** (συμπεριλαμβανομένου) έως **last** (μη συμπεριλαμβανομένου).
 </WRAP> </WRAP>
  
Line 158: Line 158:
 void print(vector<T> v) { void print(vector<T> v) {
   for(auto it = v.cbegin(); it!=v.cend(); it++)    for(auto it = v.cbegin(); it!=v.cend(); it++) 
-    cout << setw(3) << *it; 
-  cout << endl; 
-} 
- 
-template<typename T> 
-void print_r(vector<T> v) { 
-  for(auto it = v.crbegin(); it!=v.crend(); it++)  
     cout << setw(3) << *it;     cout << setw(3) << *it;
   cout << endl;   cout << endl;
cpp/stl/vector.txt · Last modified: 2023/05/29 19:12 by gthanos