Created
December 5, 2016 11:48
-
-
Save WPettersson/7510f230a1804d6956ee5a7a1a8fe767 to your computer and use it in GitHub Desktop.
Unicode in C++
This file contains 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
$ cat uni.cpp | |
#include <string> | |
#include <iostream> | |
int main(int argc, char** argv) { | |
std::string s("™"); | |
std::string t("Hello world"); | |
std::cout << t << s << std::endl; | |
return 0; | |
} | |
$ make uni.cpp && ./uni | |
g++ uni.cpp -o uni | |
Hello world™ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment