Sir dosent this work on dev c++

sir dosent this work on dev c++… i am getting error when i am running the same code on dev c++

@Vaibhav277 please send your code so i can check

#include #include using namespace std; int main(){ int n; cin>>n; int arr[10000]; for(int i=0;i<n;i++){ cin>>arr[i]; } int key; cin>>key; auto it = find(arr,arr+n,key); int index = it - arr; if(index==n){ cout<<key<<" not present"<<endl; } else{ cout<<key<<" Present at index "<<index<<endl; } }

its working fine try this

yeah its working on coding blocks IDE but not on Dev c++… Any reason for that???

maybe your compiler for dev do not support the function. like in my college computers map do no
work in code blocks so we have to select c++14 by going into compiler settings.
so some thing like that maybe the reason

Hey if your doubt is cleared don’t forget to mark it as resolved in my doubts section :smiley:

okay … thank you sir