Code and Google translate: awesomeness

Post by Nico Brailovsky @ 2016-04-08 | Permalink | Leave a comment

Some time ago I found out one of my articles was translated to another language (yay for that, woo for not letting me know about it). To understand what my own article said, I had to use Google translate on the site. Guess what? c++ and Google translate can produce hilarious results:

# The include "throw.h" the extern "the C" {void seppuku () {throw statement the Exception () ; }}

Another one I liked:

the struct the Exception {};
#ifdef __cplusplus
the extern "the C" {
#endif
void seppuku ();
# Ifdef __cplusplus
}
# endif

Now you know it. Next time you're looking at some incomprehensible c++ code, run it through Google translate. It may improve it.