Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ find index of element in array

int valueIndex = std::distance(
  yourArray, 
  std::find(
    yourArray, 
    yourArray + sizeof(yourArray) / sizeof(yourArray[0]),
    yourValueToFind));
 
PREVIOUS NEXT
Tagged: #find #index #element #array
ADD COMMENT
Topic
Name
5+2 =