Created
February 6, 2020 03:10
-
-
Save lakinwecker/03266b0a3a10fb62c0d398f27838bdbd to your computer and use it in GitHub Desktop.
:mindblown:
This file contains 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
// Type your code here, or load an example. | |
#include <iostream> | |
using namespace std; | |
template <typename T> | |
T square(T num) { | |
return num * num; | |
} | |
int square(int num) { | |
return num * num; | |
} | |
int main() { | |
cout << square(0.5f) << endl; | |
cout << square(1) << endl; | |
cout << "Hello" << endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment