/*Orion Lawlor's Simple STL Examples, olawlor@acm.org
Shows how to use std::find.
*/
#include <iostream>
#include <algorithm>

int main()
{
	double start[]={0.25, 7.5, 3.8, 1.0, 7.5};
	double *end=&start[sizeof(start)/sizeof(start[0])];
	
	double *i=start;
	while (1) {
		i=std::find(i,end,7.5);
		if (i==end) break; //Special "not found" flag
		std::cout<<"Found 7.5 at index "<<i-start<<std::endl;
		i++;
	}
	
	return 0;
}
/*<@>
<@> ******** Program output: ********
<@> Found 7.5 at index 1
<@> Found 7.5 at index 4
<@> */
