I need to ask question regarding std::set_intersection. I have used it for lists and is working well if I am using
std::set_intersection(list1.begin(),list1.end(),list2.begin(),list2.end(), std::back_inserter(Get_intersect));
But I have never used it with arrays. what about if I'll take array here? I have taken array in argument and want to perform intersection.
std::set_intersection(a[].begin(),a[].end(),list2.begin(),list2.end(), std::back_inserter(Get_intersect));
Getting this error: syntax error : ']'
. If I'll remove this []
from a[]
then I am unable to begin and end my array.