12345678910111213141516171819202122232425262728293031
#include <iostream> using namespace std; int* find(int* first, int* limit, int value){ if() *value = (first * limit); std::cout << value << std::endl; } } void print(int* first, int* limit){ while (first != limit){ std::cout << *first << ' '; ++first; } } int main(){ int a[] = {1, 2, 3,4,5}; int* first = a; // Points to the first object in a int* limit = a + 5; print(a, a + 5); }