Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.08 KB | None | 0 0
  1. Mode.h(12) : error C2374: 'NameManipulator::check' : redefinition; multiple initialization
  2. Mode.h(12) : see declaration of 'NameManipulator::check'
  3. Mode.h(22) : error C2011: 'NameManipulator::Mode' : 'class' type redefinition
  4. Mode.h(22) : see declaration of 'NameManipulator::Mode'
  5.  
  6. using namespace System;
  7. using namespace System::ComponentModel;
  8. using namespace System::Collections;
  9. using namespace System::Windows::Forms;
  10. using namespace System::Data;
  11. using namespace System::Drawing;
  12.  
  13. namespace NameManipulator {
  14. int check = 4;
  15. /// <summary>
  16. /// Summary for Mode
  17. ///
  18. /// WARNING: If you change the name of this class, you will need to change the
  19. /// 'Resource File Name' property for the managed resource compiler tool
  20. /// associated with all .resx files this class depends on. Otherwise,
  21. /// the designers will not be able to interact properly with localized
  22. /// resources associated with this form.
  23. /// </summary>
  24. public ref class Mode : public System::Windows::Forms::Form
  25. {
  26. public:
  27. Mode(void)
  28. {
  29. InitializeComponent();
  30. //
  31. //TODO: Add the constructor code here
  32. //
  33. }
  34.  
  35. protected:
  36. /// <summary>
  37. /// Clean up any resources being used.
  38. /// </summary>
  39. ~Mode()
  40. {
  41. if (components)
  42. {
  43. delete components;
  44. }
  45. }
  46. public: System::Windows::Forms::RadioButton^ rdoAllCaps;
  47. public: System::Windows::Forms::RadioButton^ rdoAllLow;
  48. public: System::Windows::Forms::RadioButton^ rdoReverse;
  49. public: System::Windows::Forms::RadioButton^ rdoNormal;
  50. private: System::Windows::Forms::Button^ btnOK;
  51. protected:
  52.  
  53. private:
  54. /// <summary>
  55. /// Required designer variable.
  56. /// </summary>
  57. System::ComponentModel::Container ^components;
  58.  
  59. #pragma region Windows Form Designer generated code
  60. /// <summary>
  61. /// Required method for Designer support - do not modify
  62. /// the contents of this method with the code editor.
  63. /// </summary>
  64. void InitializeComponent(void)
  65. {
  66. this->rdoAllCaps = (gcnew System::Windows::Forms::RadioButton());
  67. this->rdoAllLow = (gcnew System::Windows::Forms::RadioButton());
  68. this->rdoReverse = (gcnew System::Windows::Forms::RadioButton());
  69. this->rdoNormal = (gcnew System::Windows::Forms::RadioButton());
  70. this->btnOK = (gcnew System::Windows::Forms::Button());
  71. this->SuspendLayout();
  72. //
  73. // rdoAllCaps
  74. //
  75. this->rdoAllCaps->AutoSize = true;
  76. this->rdoAllCaps->Location = System::Drawing::Point(12, 12);
  77. this->rdoAllCaps->Name = L"rdoAllCaps";
  78. this->rdoAllCaps->Size = System::Drawing::Size(75, 17);
  79. this->rdoAllCaps->TabIndex = 0;
  80. this->rdoAllCaps->Text = L"ALL CAPS";
  81. this->rdoAllCaps->UseVisualStyleBackColor = true;
  82. //
  83. // rdoAllLow
  84. //
  85. this->rdoAllLow->AutoSize = true;
  86. this->rdoAllLow->Location = System::Drawing::Point(12, 35);
  87. this->rdoAllLow->Name = L"rdoAllLow";
  88. this->rdoAllLow->Size = System::Drawing::Size(63, 17);
  89. this->rdoAllLow->TabIndex = 1;
  90. this->rdoAllLow->Text = L"all lower";
  91. this->rdoAllLow->UseVisualStyleBackColor = true;
  92. this->rdoAllLow->CheckedChanged += gcnew System::EventHandler(this, &Mode::rdoAllLow_CheckedChanged);
  93. //
  94. // rdoReverse
  95. //
  96. this->rdoReverse->AutoSize = true;
  97. this->rdoReverse->Location = System::Drawing::Point(12, 58);
  98. this->rdoReverse->Name = L"rdoReverse";
  99. this->rdoReverse->Size = System::Drawing::Size(71, 17);
  100. this->rdoReverse->TabIndex = 2;
  101. this->rdoReverse->Text = L"rEVERSE";
  102. this->rdoReverse->UseVisualStyleBackColor = true;
  103. this->rdoReverse->CheckedChanged += gcnew System::EventHandler(this, &Mode::rdoReverse_CheckedChanged);
  104. //
  105. // rdoNormal
  106. //
  107. this->rdoNormal->AutoSize = true;
  108. this->rdoNormal->Checked = true;
  109. this->rdoNormal->Location = System::Drawing::Point(12, 81);
  110. this->rdoNormal->Name = L"rdoNormal";
  111. this->rdoNormal->Size = System::Drawing::Size(73, 17);
  112. this->rdoNormal->TabIndex = 3;
  113. this->rdoNormal->TabStop = true;
  114. this->rdoNormal->Text = L"rdoNormal";
  115. this->rdoNormal->UseVisualStyleBackColor = true;
  116. //
  117. // btnOK
  118. //
  119. this->btnOK->DialogResult = System::Windows::Forms::DialogResult::OK;
  120. this->btnOK->Location = System::Drawing::Point(32, 106);
  121. this->btnOK->Name = L"btnOK";
  122. this->btnOK->Size = System::Drawing::Size(33, 23);
  123. this->btnOK->TabIndex = 4;
  124. this->btnOK->Text = L"OK";
  125. this->btnOK->UseVisualStyleBackColor = true;
  126. //
  127. // Mode
  128. //
  129. this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
  130. this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
  131. this->ClientSize = System::Drawing::Size(99, 138);
  132. this->ControlBox = false;
  133. this->Controls->Add(this->btnOK);
  134. this->Controls->Add(this->rdoNormal);
  135. this->Controls->Add(this->rdoReverse);
  136. this->Controls->Add(this->rdoAllLow);
  137. this->Controls->Add(this->rdoAllCaps);
  138. this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
  139. this->Name = L"Mode";
  140. this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
  141. this->Text = L"Mode";
  142. this->Load += gcnew System::EventHandler(this, &Mode::Mode_Load);
  143. this->ResumeLayout(false);
  144. this->PerformLayout();
  145.  
  146. }
  147. #pragma endregion
  148. private: System::Void rdoReverse_CheckedChanged(System::Object^ sender, System::EventArgs^ e){
  149. if (rdoReverse->Checked == true)
  150. check = 3;
  151. }
  152. private: System::Void Mode_Load(System::Object^ sender, System::EventArgs^ e) {
  153. }
  154. private: System::Void rdoAllLow_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {
  155. }
  156. };
  157. }
  158.  
  159. namespace NameManipulator {
  160. int check = 4;
  161. // Error in the line above
  162.  
  163. namespace NameManipulator {
  164. extern int check;
  165.  
  166. int NameManipulator::check = 4;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement