日本語版 Windows では、デフォルトの文字コードとして Shift-JIS(CP932)が広く使われています。 この Shift-JIS、2バイト目が ASCII コードと同じ、という文字がいくつか存在します。 例えば「ソ」の Shift-JIS でのコードは16進数で835cで、2バイト目の5cはバックスラッシュ(または¥マーク)と同じです。 このため、例えば #include <iostream> int main() { char str[] = "ソ"; std::cout << str << std::endl; return 0; } 上記を Shift-JIS で保存してコンパイルしてみます。 Visual Studio では問題なくコンパイル・実行できるのですが、gcc(g++)では、 error: missing terminating " character ch