Created
June 30, 2009 17:34
-
-
Save jasonroelofs/138289 to your computer and use it in GitHub Desktop.
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; | |
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; | |
} |
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
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