Created
January 31, 2020 19:18
-
-
Save colbyhall/5c02078a1f6a5e82548bfbfeefbc3ba3 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
| std::string get_std_string() { | |
| return "foo bar"; | |
| } | |
| void do_thing_with_c_str(const char* c_str) { | |
| // something | |
| } | |
| int main() { | |
| char* c_str = get_std_string().c_str(); | |
| do_thing_with_c_str(c_str); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment