# 37. [C++](https://gcc.gnu.org/) (gcc), 776 bytes # 1"16" 2//v\(;@#/;n4"14" #/*`3 auaaZ<>16/"<"6/b.q@")(22)S# ␉␉␉␉ #yy␉;36!@ # ␉ #=␉> #[#yy#yy0l0mx01k1k0l0ix0jx0h0h1d111P0eU0bx0b0o1d0b0e0e00x1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10mx0m0l11111100(^_) #`<`␉| print((eval("1\x2f2")and( 9 )or(13 ))-(0and 4)^1<<(65)>>(62))or'(\{(\{})(\{}[()])}\{}\{}\{})'#46(8+9+9+9+9+=!)#1|=/=1/24=x=9[<$+@+-@@@@=>+<@@@=>+<?#>+.--.]/ __DATA__=1#// #.\."12"*␉ """"#// =begin␉// #*/ #include<iostream>␉ int main() /*/ #()"`#"\'*/{std::cout<<37;}/*'"`" $'main'␉// #-3o4o#$$$ <>3N.<>␉// #xx #x%~~~+␉+~*ttt*.x #xx =end #// """#"#// #0]#echo 21#/(\[FAC,1<-#2FAC,1SUB#1<-#52FAC,1SUB#2<-#32FACLEGEREEX,1PLEASEGIVEUPPLEASE) ap #_~nJ|#o51\ #0␛dggi2␛`␉|1|6$//''25 >>>>>#>27.say# =#print(17)#^_^_7LEintndus({})!<>+]/*///Z222999/3!@"26 `␉` is a literal tab, `␛` a literal ESC character; Stack Exchange would mangle the program otherwise. I recommend copying the program from the "input" box of the TIO link below, if you want to work on it. [Try them online!](https://tio.run/nexus/bash#lVjLdtvIEV0LvzCbNgCbgEi8SEsemw9L9shzPPHMKJas5IwoUU2gSbYFNjgAKJLR42SbnCyyzybL/Ee2@Yr8yOR2g6QoiRpPIBFoANVdVbceXYVfDHmQ/SSe9eMkJznLchKl/IKlLnkzIzuUZ1vVmjVK@ZCmM0LH@SBJ7QrZeTugImSapqanSTQOueiTfMAIF6NxTno8ZpkW0py0yGi@vCsHxCApo1FBpvWSlMgpZHgeE07C0YiowyBZMpQvcpaOUoZzRgRjEclGLOQ9HioGhE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tUar9oPbaKmn0yl@T29ubsob5ZvNPM833al62pSfS7EdgkgKqEQ0/BNDpd0qlLDax@9231aChmNU1eDg0xtD3m3d3lZxW5O3H/a@3fu4t/fHSrD/YW/3YO/b90d7n/aLMbShI83o3IjvroxkK2iDLVh9FfX7vPoVDBtcbZueVypVtwh6YBxGq/rCxdZkkKZRGD14YRunndPOiw97uBXROLNgtCeNVvkESHneT9Vq9eXLl17tyY5e3f4f "Bash – TIO Nexus") ## Rundown This program prints **37** in C++, **36** in Labrinth, **35** in INTERCAL, **34** in Rail, **33** in Incident, **32** in Whirl, **31** in Modular SNUSP, **30** in Whitespace, **29** in Trigger, **28** in Brain-Flak, **27** in Perl 6, **26** in 05AB1E, **25** in Pip, **24** in Thutu, **23** in Hexagony, **22** in Underload, **21** in Nim, **20** in Prelude, **19** in Reng, **18** in Cardinal, **17** in Julia, **16** in Pyth, **15** in Haystack, **14** in Turtlèd, **13** in Ruby, **12** in Fission, **11** in Befunge-98, **10** in Befunge-93, **9** in Perl 5, **8** in Retina, **7** in Japt, **6** in SMBF, **5** in Python 2, **4** in ><>, **3** in Minkolang, **2** in V/Vim, and **1** in Python 3. ## Verification Most of the languages are tested by the test driver shown above. You can test Reng [here](https://jsfiddle.net/Conor_OBrien/avnLdwtq/) and Modular SNUSP [here](http://www.quirkster.com/iano/snusp/snusp-js.html); they output 19 and 31 respectively, as required. I added another format to the test driver output that escapes double quotes as well as make line feed replacements. This is so I can feed the single line string to a c(gcc) program I wrapped around the function created by @feersum [here](http://codegolf.stackexchange.com/questions/107533/write-an-incident-tokeniser/107650#107650). Hopefully others can make use of it as is. [Here's the Incident token program](https://tio.run/nexus/c-gcc#ZVPrcuI2FP4Nr7B/hM0GybKxZAgpseWQbclOu5lOpmk6ndiGOFy9sQ0NZkchgQforz5jXyQ9wuymnep6js5F39E5etWTfJSuxxPkrYpxsmjO/eq/jx6TfKbOqkleoCxOckyeqwjaaB4/onwiiyBCAmk6QjzUeCfUkGPbX0Ls9nTbzdtwBvPvv/7UbeOuheJ1HN96Pu/YoeaFWse@b/7RCzWCHYdcg48KNKS0n54qbqtT6ykaVdQqKr7aAhDBYCnLJOMP/AGoRLLPks3ZnI8551dscsPuJbtnCz6GdQKdSSATNpVsxnKWcy7ZAoiRZCMgprDOlGgKTj5DTxhTvtUVGUv5vjGGB0OiINx5d5UXIJbwOAXGky9xiiHOUDpTB2KJ8zFGXUQWj5i3ECEWZnCE2mTAPQ93jonv445DQN7A4TOMLVFLgElEtkCUgzT0dgd/R7uHLmpE5y/CFtx22kKKbuDVaY9aPWjCp95hO9N92rSsZmQDwOHwh/Nfz4dDwXVb8XozbAJQAGmoJw21spdCcT@ZJXmlVDT266EOvGQBhTCJM19ZvRUCQnaph0mo3engqmHYz1BGp6ejxbrwvNaJu7WNBgj3JVBvKLvG4QqrtWgv9Hq9Doznt35uev5BIuV@fb/b7WiF7oyiKIym/CYRE3hNhErUhwi@BqGzSJ@M5gvkQMg4DC7Ovze5Z@nOnri@@aAr7viNdYBtKfay/7H/S7//u8mvLvvn1/2PP/7Wv7kqaYg0Xirvw13@04u@OOYhANhf9248myXOOygI/tKp23aj4Rwj5Kum@85JcxU/6UjoZanwE6IPhoPhyWUf2Hy8XmFIdM3zaQQvadu3juN0u127VYM/4XQ0d//Tplh9M@JWt1WjMDO3qr6esXSrn/CIPE@hzNxddnQ0GiyDLHJJJgq1U5q52@oDTkoVoxCZsLi7DJLILQJKk0hk5BNWPHEzwUB5iveeV4cfrhKdC8h8OsnxipibILd2eWReBDnlkbk2jVuxMWPBTAkzPYCFuwqxobkbezApPTj72pZiRWP3P0fK5AGnYhPEkWDETcGQ0gsIAvCtgpTSiMClKQj/b@imR0cxTX3pppZFlNagdXYRFEBEVCj@FMeePNsEa7A/xbALuCYlABrsSOlx@w074HPhbff5mmLtfdNYaRAopeYSYiHVN8BSYZWANRPCuD0zbg1Rq20CaWWRWebglJX6KgqpolApfH39Bw). Ideally I'd like to deliminate the tokens since they are a bit hard to read, indicate the "center" token, and include it in the test driver. But I don't really know how to do anything other than make various programs print sequential integers, so this is as far as I've gotten. I've attempted to solve the obvious Incident problems, like tokens after the beginning and end jump tokens and anything that looked extraneous, but I haven't balanced the tokens to put `0o` at the center. I'm not really sure what the logic is exactly to determine the center. I'm hoping @ais523 will help there. This string near the end `7LEintndus({})!<>+` would all be tokens if not for this 4th inclusion in the code. These can all be removed (and replaced with a `.` for Hexagony alignment) in order to adjust the center token. I'm going to be updating this post off and on over the next day or two to walk through the code, (assuming Incident can be verified/fixed without going over the byte count). But it's super late now, and I mostly wanted to get this out there before I had to solve another Labyrinth like problem. :P ## Explanation ##How the C++ code works. I think most people are familiar enough with C++, so I won’t go into too much detail. Block comments come in the form of `/* comment */`. Line comments come in the form of `//comment`. The actual code utilized by C++ to produce the answer is `int main() {std::cout<<37;}`. ## /\*Comments Abuse\*/ For me, the story of C++ goes back to my Brain-Flak answer. After finally finding #28, I set out to study some other polyglots posted in PPGC and all that studying led me to a few easy answers (most of these are still available to be found if anyone else is so inclined). But more importantly, I came to a conclusion about polyglots in general: large polyglots tend to fall into one of two broad categories: `#` comment abuse or `/*` comment abuse. This is not a fact or restriction in anyway, but of a personal mental framework that guided my next several answers. From here I reasoned that if this was to become the world’s largest polyglot, which I presume it to be currently, it would be best if it could leverage comment abuse from both comment families. So I set out to find a way incorporate a `/*` comment language and pushed towards the C family due mostly to a personal familiarity. ## C++ Initial Test My initial thought process for this was to use C# mostly because of my familiarity and the first hurdle for C# was getting the polyglot into a state where it could accept a line that didn’t start with `#` without otherwise being treated as code by the scripting languages. The Rail answer, along with several byte inflating answers that lead up to it, solved this piece. Next came the problem of how to initiate the first `/*` comment block. I knew the line would have to start the line with a `#` to remain invisible to Perl, Ruby and Python, but whatever came before the `/*` would be read by C#. I attempted a C# `#region` tag at first, but that turned out to be too ridged for the 2D languages. Enter C++. C++ has several preprocessor directives that all start with `#`, which give a lot of options for the 2D languages to traverse. But it turned out that all of them were incompatible with at least one language, and being in a C++ exposed code space, I had limited workarounds. Out of frustration and desperation, I stumbled into the fact that C++ would simply accept just a single `#` before the comment block. Okay, whatever, that’s workable. So I moved forward with the presumption that `#/*` could work as the first three characters in the polyglot. The second piece of basic verification was to ensure that the actual print statement could live happily with the other codes. I knew from the Brain-Flak answer that Japt didn’t like un-escaped `{`’s and that was needed for C++ to say `int main() {std::cout<<37;}` and C++ wouldn’t allow Japt’s escape character in the middle of its code. This time I was lucky enough to find that if I dropped out of Japt’s literal string just for this statement, Japt would still happily produce the same result. Meanwhile, Brain-Flak didn’t like the `{}` either, but I was again lucky to find that C++ was ok with a `#` between its `int main()` and `{std::cout<<37;}` statements, allowing the curly braces to be commented out of Brain-Flak’s perspective. So, with the main problems of C++ proven to be theoretically solvable, I began the arduous process of resolving all the errors I’d introduced. ## 2D (TODO)