This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CPP program to demonstrate simple function template. | |
#include <iostream> | |
using namespace std; | |
template <typename T> | |
T my_max(T a, T b) { | |
return ((a > b)?a:b); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main(int argc, char ** argv) { | |
int myInteger {10}; | |
cout << "myInteger = " << myInteger << endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
int main(int argc, char ** argc) { | |
std::cout << "Hello World!!" << std::endl; | |
} |