Is it possible to search for the value stored in an array?
Not the index of the array.
Code:#include <iostream> #include <stdlib.h> using namespace std; int main() { char a[2][2]={{50,179},{80,110}}; for(int i = 0; i < 2; i++) { for(int j = 0; j < 2; j++) { if(*(a[i][j])=='80') // something like this { cout<<"80"<<endl; } else { cout<<"not found"; } } } cout<<endl<<endl; return 0; }




Reply With Quote