Horje
Max element in an array with the index in c++ Code Example
Max element in an array with the index in c++
int main(int argc, char** argv) {
  int A[4] = {0, 2, 3, 1};
  const int N = sizeof(A) / sizeof(int);

  cout << "Index of max element: "
       << distance(A, max_element(A, A + N))
       << endl;

  return 0;
}




Cpp

Related
print vector c++ Code Example print vector c++ Code Example
count spaces in string java Code Example count spaces in string java Code Example
pass map as reference c++ Code Example pass map as reference c++ Code Example
gamemaker studio Code Example gamemaker studio Code Example
temperature conversion in c++ Code Example temperature conversion in c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8