Skip to content

Instantly share code, notes, and snippets.

@jasonroelofs
Created June 30, 2009 17:34
Show Gist options
  • Save jasonroelofs/138289 to your computer and use it in GitHub Desktop.
Save jasonroelofs/138289 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
template<class ArgType>
void func(int val, ArgType arg) {
cout << "In func, val is " << val << " and arg is " << arg << endl;
}
int main() {
func(14, 3);
// What does this mean?
int val = (3, "string", 8.23, 8, 10);
cout << "Our val is " << val << endl;
// And this?
func(1, (2,3,4,5,6));
return 1;
}
In func, val is 14 and arg is 3
Our val is 10
In func, val is 1 and arg is 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment