Created
June 11, 2017 11:17
-
-
Save cblp/3098261b8d35f5bb92696baf7007fcc7 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; | |
struct Point { | |
double x, y; | |
}; | |
string to_string(Point p) { | |
return string("Point{") + to_string(p.x) + ", " + to_string(p.y) + "}"; | |
} | |
int main() { | |
Point origin{0, 0}; | |
cout << "origin is " << to_string(origin) << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment