Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 153 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

There are a whole bunch of questions about whether you can declare multiple variables of different types in a for-loop initializer:

Clearly the C questions (resp. C++ questions) should be duped together.

Now C and C++ are quite distinct languages. However, in this case, the questions are all asking about a feature of C (technically C99) syntax that (I think) was taken unchanged into C++. Here, any answer to the C question will equally apply to the C++ one. So should these be duped into a single question for both C and C++ here?

Related: Should we close VB.NET questions as duplicates of C# questions and likewise? 's accepted answer is that a question about .NET framework features common to 2 languages warrant closing as a duplicate.

share|improve this question

closed as off-topic by Martijn Pieters, Shadow Wizard, gnat, Braiam, James Dec 11 '14 at 14:53

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question pertains only to a specific site in the Stack Exchange Network. Questions on Meta Stack Exchange should pertain to our network or software that drives it as a whole, within the guidelines defined in the help center. You should ask this question on the meta site where your concern originated." – Martijn Pieters, Shadow Wizard, gnat, Braiam, James
If this question can be reworded to fit the rules in the help center, please edit the question.

Check carefully that the feature are the same between the 2 languages, and whether the thing being asked in the question doesn't depend on a difference between 2 languages. There are some small difference between the 2 language that makes the answer right or wrong (particularly UB for certain expression i = i++). – nhahtdh Aug 17 '12 at 5:28
@nhahtdh: In general that's true, but I don't think C++ extends the syntax for variable declarations in this case. – Mechanical snail Aug 17 '12 at 5:29
You are probably right. I haven't checked the standard, but it is likely that there is no difference here. – nhahtdh Aug 17 '12 at 5:32
up vote 2 down vote accepted

No. Questions must not be marked as duplicates if they would have different answer. C and C++ may have the same feature now, but a good C answer would point out compatibility issues with older compilers, and a good C++ answer would point out different compatibility issues with older compilers.

Furthermore, while the C questions are about related topics, none of the three is a duplicate of any other. I won't venture to judge the C++ questions but they don't all look like duplicates of each other either.

share|improve this answer

There are some criteria for me:

  1. Are they the same language or nearly the same? (for in C and C++ declarations are the same if for example, don't use std::safe_pointer)
  2. Do they cover the same area? (Your first two both covered for loops, but the problem was in different areas of it)
share|improve this answer
Right. The first one has problem in the condition part. The others are mostly about the initialization part. – nhahtdh Aug 17 '12 at 5:38
That's my mistake; the very first one isn't a duplicate. Edited (and added some more dupes) – Mechanical snail Aug 17 '12 at 5:53

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