Skip to content

Instantly share code, notes, and snippets.

/gist:5048103
Created Feb 27, 2013

Embed
What would you like to do?
#include <vector>
#include <iostream>
using namespace std;
void fun(const vector<int> &v = vector<int>()){
cout << "output" << endl;
for(size_t i = 0; i < v.size(); i++){
cout << " " << v[i] << endl;
}
}
int
main(void){
vector<int> b;
b.push_back(1);
fun(b);
fun();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.