Hi,
I can not make the following piece of code to work in root. Can somebody tell me how can I fix it or recommend some other way to do it. I want a function that returns “bool true” when both row and column are matched to the row and column in the list of pairs.
#include <utility>
pair_test() {
inline bool noisy(int col, int row) {
std::pair <int,int> noisy_pixel_list[] {
std::pair <int,int> (15,66),
std::pair <int,int> (15,67),
std::pair <int,int> (14,66),
std::pair <int,int> (14,67),
std::pair <int,int> (14,68),
std::pair <int,int> (14,69),
std::pair <int,int> (18,78),
std::pair <int,int> (14,65),
std::pair <int,int> (16,66)
};
for(int i=1;i<7;i++) {
cout << noisy_pixel_list[i].first << " " << noisy_pixel_list[i].second << endl;
if(col==noisy_pixel_list[i].first && row==noisy_pixel_list[i].second) return true;
else retrun false;
}
}
if( !noisy(1,3)) cout << "good" << endl;
}
Thank you,
Dmitry.