prog.cpp: In function ‘void FindMissingElements(int*, int)’:
prog.cpp:8:5: error: ‘map’ was not declared in this scope
map<int,int>m;
^~~
prog.cpp:8:5: note: suggested alternative:
In file included from /usr/include/c++/8/map:61,
from prog.cpp:1:
/usr/include/c++/8/bits/stl_map.h:100:11: note: ‘std::map’
class map
^~~
prog.cpp:8:9: error: expected primary-expression before ‘int’
map<int,int>m;
^~~
prog.cpp:9:13: error: ‘INT_MAX’ was not declared in this scope
int a = INT_MAX;
^~~~~~~
prog.cpp:9:13: note: ‘INT_MAX’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?
prog.cpp:2:1:
+#include <climits>
void FindMissingElements(int arr[], int n){
prog.cpp:9:13:
int a = INT_MAX;
^~~~~~~
prog.cpp:10:13: error: ‘INT_MIN’ was not declared in this scope
int b = INT_MIN;
^~~~~~~
prog.cpp:10:13: note: ‘INT_MIN’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?
prog.cpp:12:7: error: ‘min’ was not declared in this scope
a = min(a,arr[i]);
^~~
prog.cpp:12:7: note: suggested alternative:
In file included from /usr/include/c++/8/bits/stl_tree.h:63,
from /usr/include/c++/8/map:60,
from prog.cpp:1:
/usr/include/c++/8/bits/stl_algobase.h:243:5: note: ‘std::min’
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
prog.cpp:13:13: error: ‘max’ was not declared in this scope
b = max(a,arr[i]);
^~~
prog.cpp:13:13: note: suggested alternative:
In file included from /usr/include/c++/8/bits/stl_tree.h:63,
from /usr/include/c++/8/map:60,
from prog.cpp:1:
/usr/include/c++/8/bits/stl_algobase.h:265:5: note: ‘std::max’
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
prog.cpp:14:9: error: ‘m’ was not declared in this scope
m[arr[i]]++;
^
prog.cpp:18:12: error: ‘m’ was not declared in this scope
if(m.find(i) == m.end()){
^
prog.cpp:19:13: error: ‘cout’ was not declared in this scope
cout<<i<<" ";
^~~~