Skip to content

Instantly share code, notes, and snippets.

@ashgti
Created January 11, 2012 00:04
Show Gist options
  • Select an option

  • Save ashgti/1592054 to your computer and use it in GitHub Desktop.

Select an option

Save ashgti/1592054 to your computer and use it in GitHub Desktop.
#include <string>
#include <iostream>
using std::string;
using std::cout;
using std::endl;
void foo(string &foo) {
foo += "hello";
}
int main() {
string f;
foo(f);
cout << f << endl;
}%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment