title: redefinition; multiple initialization
body: <p>I'm writing a program that includes a secondary form using C++/CLI in Visual Studio 2005. So far, I haven't progressed much due to a pair of redefinition errors that don't make much sense.</p>
  
  <pre><code>Mode.h(12) : error C2374: 'NameManipulator::check' : redefinition; multiple initialization
  Mode.h(12) : see declaration of 'NameManipulator::check'
  Mode.h(22) : error C2011: 'NameManipulator::Mode' : 'class' type redefinition
  Mode.h(22) : see declaration of 'NameManipulator::Mode'
  </code></pre>
  
  <p>I've only declared each of these once, in just one namespace. One was even pre-generated by the compiler. Is there anything I can do to fix this besides starting from scratch? Any help would be much appreciated. (Code below)</p>
  
  <pre><code>using namespace System;
  using namespace System::ComponentModel;
  using namespace System::Collections;
  using namespace System::Windows::Forms;
  using namespace System::Data;
  using namespace System::Drawing;
  
  namespace NameManipulator {
  int check = 4;
  /// &lt;summary&gt;
  /// Summary for Mode
  ///
  /// WARNING: If you change the name of this class, you will need to change the
  ///          'Resource File Name' property for the managed resource compiler tool
  ///          associated with all .resx files this class depends on.  Otherwise,
  ///          the designers will not be able to interact properly with localized
  ///          resources associated with this form.
  /// &lt;/summary&gt;
  public ref class Mode : public System::Windows::Forms::Form
  {
  public:
      Mode(void)
      {
          InitializeComponent();
          //
          //TODO: Add the constructor code here
          //
      }
  
  protected:
      /// &lt;summary&gt;
      /// Clean up any resources being used.
      /// &lt;/summary&gt;
      ~Mode()
      {
          if (components)
          {
              delete components;
          }
      }
  public: System::Windows::Forms::RadioButton^  rdoAllCaps;
  public: System::Windows::Forms::RadioButton^  rdoAllLow;
  public: System::Windows::Forms::RadioButton^  rdoReverse;
  public: System::Windows::Forms::RadioButton^  rdoNormal;
  private: System::Windows::Forms::Button^  btnOK;
  protected: 
  
  private:
      /// &lt;summary&gt;
      /// Required designer variable.
      /// &lt;/summary&gt;
      System::ComponentModel::Container ^components;
  
  #pragma region Windows Form Designer generated code
      /// &lt;summary&gt;
      /// Required method for Designer support - do not modify
      /// the contents of this method with the code editor.
      /// &lt;/summary&gt;
      void InitializeComponent(void)
      {
          this-&gt;rdoAllCaps = (gcnew System::Windows::Forms::RadioButton());
          this-&gt;rdoAllLow = (gcnew System::Windows::Forms::RadioButton());
          this-&gt;rdoReverse = (gcnew System::Windows::Forms::RadioButton());
          this-&gt;rdoNormal = (gcnew System::Windows::Forms::RadioButton());
          this-&gt;btnOK = (gcnew System::Windows::Forms::Button());
          this-&gt;SuspendLayout();
          // 
          // rdoAllCaps
          // 
          this-&gt;rdoAllCaps-&gt;AutoSize = true;
          this-&gt;rdoAllCaps-&gt;Location = System::Drawing::Point(12, 12);
          this-&gt;rdoAllCaps-&gt;Name = L"rdoAllCaps";
          this-&gt;rdoAllCaps-&gt;Size = System::Drawing::Size(75, 17);
          this-&gt;rdoAllCaps-&gt;TabIndex = 0;
          this-&gt;rdoAllCaps-&gt;Text = L"ALL CAPS";
          this-&gt;rdoAllCaps-&gt;UseVisualStyleBackColor = true;
          // 
          // rdoAllLow
          // 
          this-&gt;rdoAllLow-&gt;AutoSize = true;
          this-&gt;rdoAllLow-&gt;Location = System::Drawing::Point(12, 35);
          this-&gt;rdoAllLow-&gt;Name = L"rdoAllLow";
          this-&gt;rdoAllLow-&gt;Size = System::Drawing::Size(63, 17);
          this-&gt;rdoAllLow-&gt;TabIndex = 1;
          this-&gt;rdoAllLow-&gt;Text = L"all lower";
          this-&gt;rdoAllLow-&gt;UseVisualStyleBackColor = true;
          this-&gt;rdoAllLow-&gt;CheckedChanged += gcnew System::EventHandler(this, &amp;Mode::rdoAllLow_CheckedChanged);
          // 
          // rdoReverse
          // 
          this-&gt;rdoReverse-&gt;AutoSize = true;
          this-&gt;rdoReverse-&gt;Location = System::Drawing::Point(12, 58);
          this-&gt;rdoReverse-&gt;Name = L"rdoReverse";
          this-&gt;rdoReverse-&gt;Size = System::Drawing::Size(71, 17);
          this-&gt;rdoReverse-&gt;TabIndex = 2;
          this-&gt;rdoReverse-&gt;Text = L"rEVERSE";
          this-&gt;rdoReverse-&gt;UseVisualStyleBackColor = true;
          this-&gt;rdoReverse-&gt;CheckedChanged += gcnew System::EventHandler(this, &amp;Mode::rdoReverse_CheckedChanged);
          // 
          // rdoNormal
          // 
          this-&gt;rdoNormal-&gt;AutoSize = true;
          this-&gt;rdoNormal-&gt;Checked = true;
          this-&gt;rdoNormal-&gt;Location = System::Drawing::Point(12, 81);
          this-&gt;rdoNormal-&gt;Name = L"rdoNormal";
          this-&gt;rdoNormal-&gt;Size = System::Drawing::Size(73, 17);
          this-&gt;rdoNormal-&gt;TabIndex = 3;
          this-&gt;rdoNormal-&gt;TabStop = true;
          this-&gt;rdoNormal-&gt;Text = L"rdoNormal";
          this-&gt;rdoNormal-&gt;UseVisualStyleBackColor = true;
          // 
          // btnOK
          // 
          this-&gt;btnOK-&gt;DialogResult = System::Windows::Forms::DialogResult::OK;
          this-&gt;btnOK-&gt;Location = System::Drawing::Point(32, 106);
          this-&gt;btnOK-&gt;Name = L"btnOK";
          this-&gt;btnOK-&gt;Size = System::Drawing::Size(33, 23);
          this-&gt;btnOK-&gt;TabIndex = 4;
          this-&gt;btnOK-&gt;Text = L"OK";
          this-&gt;btnOK-&gt;UseVisualStyleBackColor = true;
          // 
          // Mode
          // 
          this-&gt;AutoScaleDimensions = System::Drawing::SizeF(6, 13);
          this-&gt;AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
          this-&gt;ClientSize = System::Drawing::Size(99, 138);
          this-&gt;ControlBox = false;
          this-&gt;Controls-&gt;Add(this-&gt;btnOK);
          this-&gt;Controls-&gt;Add(this-&gt;rdoNormal);
          this-&gt;Controls-&gt;Add(this-&gt;rdoReverse);
          this-&gt;Controls-&gt;Add(this-&gt;rdoAllLow);
          this-&gt;Controls-&gt;Add(this-&gt;rdoAllCaps);
          this-&gt;FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
          this-&gt;Name = L"Mode";
          this-&gt;StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
          this-&gt;Text = L"Mode";
          this-&gt;Load += gcnew System::EventHandler(this, &amp;Mode::Mode_Load);
          this-&gt;ResumeLayout(false);
          this-&gt;PerformLayout();
  
      }
  #pragma endregion
  private: System::Void rdoReverse_CheckedChanged(System::Object^  sender, System::EventArgs^  e){
               if (rdoReverse-&gt;Checked == true)
                   check = 3;
           }
  private: System::Void Mode_Load(System::Object^  sender, System::EventArgs^  e) {
           }
  private: System::Void rdoAllLow_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
           }
  };
  }
  </code></pre>