Site Tools


c_for_each

Differences

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

Link to this comparison view

c_for_each [2013/02/26 21:05] (current)
konovalov created
Line 1: Line 1:
 +  int arr[8] = {42, 31, 53, 123, 346, 567, 678, 1}; 
 +   
 +  void printMe(int i){ 
 +    cout << i << " "; 
 +  } 
 +   
 +  int main(int argc, char** argv){ 
 +    for_each(arr,​ arr+8, printMe); 
 +  } 
 +  //out  
 +  42 31 53 123 346 567 678 1  ​
c_for_each.txt · Last modified: 2013/02/26 21:05 by konovalov

Page Tools