diff --git a/runtime/Cpp/demo/Windows/antlr4-cpp-demo/main.cpp b/runtime/Cpp/demo/Windows/antlr4-cpp-demo/main.cpp index 28b61a785..181d0d0fd 100644 --- a/runtime/Cpp/demo/Windows/antlr4-cpp-demo/main.cpp +++ b/runtime/Cpp/demo/Windows/antlr4-cpp-demo/main.cpp @@ -30,16 +30,12 @@ int main(int argc, const char * argv[]) { CommonTokenStream tokens(&lexer); TParser parser(&tokens); - tree::ParseTree* tree = parser.main(); + tree::ParseTree *tree = parser.main(); std::wstring s = antlrcpp::s2ws(tree->toStringTree(&parser)) + L"\n"; - // Unfortunately, there is no way of showing the Unicode output properly in either the Intermediate Window in VS - // (when using OutputDebugString), nor in a terminal (when using wcout). Instead set a breakpoint and view the - // content of s in the debugger, which works fine. - - OutputDebugString(s.data()); - std::wcout << "Parse Tree: " << s << std::endl; + OutputDebugString(s.data()); // Only works properly since VS 2015. + //std::wcout << "Parse Tree: " << s << std::endl; Unicode output in the console is very limited. return 0; }