Skip to content

Instantly share code, notes, and snippets.

@tornikegomareli
Created May 16, 2017 17:42
Show Gist options
  • Save tornikegomareli/b33931af3501e7225e52523a4b324b44 to your computer and use it in GitHub Desktop.
Save tornikegomareli/b33931af3501e7225e52523a4b324b44 to your computer and use it in GitHub Desktop.
template functions
template <typename T>
void print(int a, T b)
{
cout << " a = " << a << endl;
cout << " b = " << b << endl;
}
template <typename T>
void print(int a, T b)
{
cout << " a = " << a << endl;
cout << " b = " << b << endl;
}
int main()
{
print(123, 'a');
print(123, 125);
cin.get();
cin.get();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment