I’ve been going back and forth between C++ and C# alot in my current job. When switching between languages, certain elements bleed together leading to the same mistakes over and over. Some of mine:
[]) on the type instead of the variable name (eg, int[] whatever in C# vs int whatever[] in C++)") instead of the L prefix to denote UnicodePascalCase instead of the camelCase in our C++ conventionnew, which particularly sucks since it won’t yield a compile errornullL to denote Unicodenewdeleteing objects when I’m done with themNULL instead of nullif (whatever) instead of if (whatever != null) newing types with default ctors without parens, eg new SOME_STRUCT instead of new SOME_STRUCT()I have similar problems with other languages, but the only one that really jumps out at me now is using/not using semicolons when transitioning to/from VB/VBScript. Thankfully I haven’t had to do that in such a long while I cannot recall what other differences tripped me up.