jameskilton (owner)

Revisions

gist: 138289 Download_button fork
public
Public Clone URL: git://gist.github.com/138289.git
Embed All Files: show embed
params.cpp #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#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;
}
run.txt #
1
2
3
In func, val is 14 and arg is 3
Our val is 10
In func, val is 1 and arg is 6