fork download
  1. #pragma once
  2.  
  3. namespace test_mkdir {
  4.  
  5. using namespace System;
  6. using namespace System::ComponentModel;
  7. using namespace System::Collections;
  8. using namespace System::Windows::Forms;
  9. using namespace System::Data;
  10. using namespace System::Drawing;
  11.  
  12. /// <summary>
  13. /// Form1 の概要
  14. /// </summary>
  15. public ref class Form1 : public System::Windows::Forms::Form
  16. {
  17. public:
  18. Form1(void)
  19. {
  20. InitializeComponent();
  21. //
  22. //TODO: ここにコンストラクター コードを追加します
  23. //
  24. }
  25.  
  26. protected:
  27. /// <summary>
  28. /// 使用中のリソースをすべてクリーンアップします。
  29. /// </summary>
  30. ~Form1()
  31. {
  32. if (components)
  33. {
  34. delete components;
  35. }
  36. }
  37. private: System::Windows::Forms::Button^ button1;
  38. private: System::Windows::Forms::Label^ label1;
  39. private: System::Windows::Forms::TextBox^ textBox1;
  40. protected:
  41.  
  42. private:
  43. /// <summary>
  44. /// 必要なデザイナー変数です。
  45. /// </summary>
  46. System::ComponentModel::Container ^components;
  47.  
  48. #pragma region Windows Form Designer generated code
  49. /// <summary>
  50. /// デザイナー サポートに必要なメソッドです。このメソッドの内容を
  51. /// コード エディターで変更しないでください。
  52. /// </summary>
  53. void InitializeComponent(void)
  54. {
  55. this->button1 = (gcnew System::Windows::Forms::Button());
  56. this->label1 = (gcnew System::Windows::Forms::Label());
  57. this->textBox1 = (gcnew System::Windows::Forms::TextBox());
  58. this->SuspendLayout();
  59. //
  60. // button1
  61. //
  62. this->button1->Location = System::Drawing::Point(124, 102);
  63. this->button1->Name = L"button1";
  64. this->button1->Size = System::Drawing::Size(75, 23);
  65. this->button1->TabIndex = 0;
  66. this->button1->Text = L"実行";
  67. this->button1->UseVisualStyleBackColor = true;
  68. this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
  69. //
  70. // label1
  71. //
  72. this->label1->AutoSize = true;
  73. this->label1->Location = System::Drawing::Point(56, 53);
  74. this->label1->Name = L"label1";
  75. this->label1->Size = System::Drawing::Size(35, 12);
  76. this->label1->TabIndex = 1;
  77. this->label1->Text = L"label1";
  78. this->label1->Click += gcnew System::EventHandler(this, &Form1::label1_Click);
  79. //
  80. // textBox1
  81. //
  82. this->textBox1->Location = System::Drawing::Point(97, 160);
  83. this->textBox1->Name = L"textBox1";
  84. this->textBox1->Size = System::Drawing::Size(100, 19);
  85. this->textBox1->TabIndex = 2;
  86. this->textBox1->Text = L"testtmp";
  87. this->textBox1->TextChanged += gcnew System::EventHandler(this, &Form1::textBox1_TextChanged);
  88. //
  89. // Form1
  90. //
  91. this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
  92. this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
  93. this->ClientSize = System::Drawing::Size(292, 273);
  94. this->Controls->Add(this->textBox1);
  95. this->Controls->Add(this->label1);
  96. this->Controls->Add(this->button1);
  97. this->Name = L"Form1";
  98. this->Text = L"Form1";
  99. this->ResumeLayout(false);
  100. this->PerformLayout();
  101.  
  102. }
  103. #pragma endregion
  104. private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
  105. // これは作成される
  106. _mkdir("tmp");
  107. // これは駄目。何故??
  108. _mkdir(this->textBox1->Text);
  109. }
  110. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:9: warning: #pragma once in main file
prog.cpp:48: warning: ignoring #pragma region Windows
prog.cpp:103: warning: ignoring #pragma endregion 
prog.cpp:5: error: ‘System’ is not a namespace-name
prog.cpp:5: error: expected namespace-name before ‘;’ token
prog.cpp:6: error: ‘System’ has not been declared
prog.cpp:6: error: ‘ComponentModel’ is not a namespace-name
prog.cpp:6: error: expected namespace-name before ‘;’ token
prog.cpp:7: error: ‘System’ has not been declared
prog.cpp:7: error: ‘Collections’ is not a namespace-name
prog.cpp:7: error: expected namespace-name before ‘;’ token
prog.cpp:8: error: ‘System’ has not been declared
prog.cpp:8: error: ‘Forms’ is not a namespace-name
prog.cpp:8: error: expected namespace-name before ‘;’ token
prog.cpp:9: error: ‘System’ has not been declared
prog.cpp:9: error: ‘Data’ is not a namespace-name
prog.cpp:9: error: expected namespace-name before ‘;’ token
prog.cpp:10: error: ‘System’ has not been declared
prog.cpp:10: error: ‘Drawing’ is not a namespace-name
prog.cpp:10: error: expected namespace-name before ‘;’ token
prog.cpp:15: error: expected unqualified-id before ‘public’
prog.cpp:110: error: expected `}' at end of input
stdout
Standard output is empty