I've noticed more and more questions recently having their posts tagged with C++ both and . A couple examples that I have recently handled myself:

As these questions stand, they will not compile as vanilla C code even though they may have a similar syntax and only minor porting changes would have to be made.

Am I wrong to remove the tag from these posts?


I cannot see how a post can be tagged with both and on Code Review, other than an intentional polyglot.

In terms of and , if a person writes the code in a C style and compiles it with C++ then it is a C++ question, because Answers can then use C++ features as part of the recommendation. If C++ related suggestions are not 'OK' for the question, then it should not be tagged with , and it should not be compiled with C++.

The reverse is also true. Even though people who know C++ may be able to help a -tagged question, then it should still be tagged because it will be compiled with C.

A question writing C++ style and compiled with C is not possible.

A question writing C style and compiled with C++ is possible, but only as a compatibility layer, and is not essentially being compiled as C++

So, a question needs to choose their compiler as part of the tagging, rather than just the style of the code.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .