#include <limits>
int imin = std::numeric_limits<int>::min(); // minimum value
int imax = std::numeric_limits<int>::max(); // maximum value (2147483647)
#include <climits>
INT_MAX // 2147483647
int INT_MAX = 2147483647;
#include<algorithm>
using namespace std;
int main(){
int exa=8;
int exa2=20;
max=max(exa,exa2);
}
2147483647
unsigned long long int = 18 446 744 073 709 551 615
// max example
#include <iostream> // std::cout
#include <algorithm> // std::max
int main () {
std::cout << "max(1,2)==" << std::max(1,2) << '
';
std::cout << "max(2,1)==" << std::max(2,1) << '
';
std::cout << "max('a','z')==" << std::max('a','z') << '
';
std::cout << "max(3.14,2.73)==" << std::max(3.14,2.73) << '
';
return 0;
}
int i=INT_MAX;
#include <algorithm> // these two line of code should bw included
using namespace std;
class RandomClass
{
int Functions(int a,int b)
{
return max(a,b);
}
};
Code Example |
---|
Cpp :: c++ for loop syntax |
Cpp :: backtrack |
Cpp :: c++ classes |
Cpp :: c++ swap function |
Cpp :: swap alternate elements in an array c++ problem |
Cpp :: c++ awitch statements |
Cpp :: C++ to specify size and value |
Cpp :: c++ memory address |
Cpp :: c++ check if number is even or odd |
Cpp :: Temparory Email Id |
Cpp :: how to make a pointer point to a the last value in an array |
Cpp :: Basic Makefile C++ |
Cpp :: phi function (n log (log(n))) |
Cpp :: Array Rotate in c++ |
Cpp :: c++ initialize size of 3d vector |
Cpp :: queue in cpp |
Cpp :: cpp compare strings |
Cpp :: logisch oder |
Cpp :: C++ CHEAT SHEAT |
Cpp :: prefix using stack |
Cpp :: i++ i-- |
Cpp :: input numbers to int c++ |
Cpp :: C++ Relational Operators |
Cpp :: c++ bind port |
Cpp :: decemal representation |
Cpp :: properties of loop in c++ and how it works |
Cpp :: and condtion c++ |
Cpp :: Nested ternary operator C++ |
Cpp :: convert c++ to c language |
Cpp :: convert java to c++ |