Search
 
SCRIPT & CODE EXAMPLE
 

CPP

min element in stl c++

#include <bits/stdc++.h>
using namespace std;
int main()
{
  	vector<int> v{ 9, 4, 7, 2, 5, 10, 11, 12, 1, 3, 6 };
	int c = *min_element(v.begin(), v.end());
  
    cout<<"Min Element of the vector is "<< c;
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: casting c++ 
Cpp :: ViewController import 
Cpp :: c++ check palindrome 
Cpp :: hamming distance c++ 
Cpp :: how to get the size of a vector in c++ 
Cpp :: OpenGL C++ Version 
Cpp :: continue c++ 
Cpp :: convert decimal to binary in c++ 
Cpp :: lutris 
Cpp :: cout hex c++ 
Cpp :: c++ vector initialization 
Cpp :: int max c++ 
Cpp :: initialize vector of vector c++ 
Cpp :: how to remove a index from a string in cpp 
Cpp :: C++ break with for loop 
Cpp :: How to write into files in C++ 
Cpp :: 3d projection onto 2d plane algorithm 
Cpp :: selection sort c++ algorithm 
Cpp :: str remove char c++ 
Cpp :: integer to char c++ 
Cpp :: temperature conversion in c++ 
Cpp :: c++ builder 
Cpp :: zero fill in c++ 
Cpp :: quicksort 
Cpp :: inline c++ 
Cpp :: create matrix cpp 
Cpp :: structure of a function in C++ 
Cpp :: unpack tuple c++ 
Cpp :: sort strings by length and by alphabet 
Cpp :: find positive number factorial in C++ 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =