fork download
  1. #pragma once
  2.  
  3. namespace marketProject {
  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. /// Summary for Form2
  14. /// </summary>
  15. public ref class Form2 : public System::Windows::Forms::Form
  16. {
  17. public:
  18. Form2(void)
  19. {
  20. InitializeComponent();
  21. //
  22. //TODO: Add the constructor code here
  23. //
  24. }
  25.  
  26. Form2(Form1^ parent)
  27. {
  28. parentForm = parent;
  29. }
  30.  
  31. protected:
  32. /// <summary>
  33. /// Clean up any resources being used.
  34. /// </summary>
  35. ~Form2()
  36. {
  37. if (components)
  38. {
  39. delete components;
  40. }
  41. }
  42.  
  43. private:
  44. Form1^ parentForm;
  45. /// <summary>
  46. /// Required designer variable.
  47. /// </summary>
  48. System::ComponentModel::Container ^components;
  49.  
  50. #pragma region Windows Form Designer generated code
  51. /// <summary>
  52. /// Required method for Designer support - do not modify
  53. /// the contents of this method with the code editor.
  54. /// </summary>
  55. void InitializeComponent(void)
  56. {
  57. this->components = gcnew System::ComponentModel::Container();
  58. this->Size = System::Drawing::Size(300,300);
  59. this->Text = L"Form2";
  60. this->Padding = System::Windows::Forms::Padding(0);
  61. this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
  62. }
  63. #pragma endregion
  64. };
  65. }
  66.  
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
 #pragma once
         ^~~~
prog.cpp:5:18: error: ‘System’ is not a namespace-name
  using namespace System;
                  ^~~~~~
prog.cpp:5:24: error: expected namespace-name before ‘;’ token
  using namespace System;
                        ^
prog.cpp:6:18: error: ‘System’ has not been declared
  using namespace System::ComponentModel;
                  ^~~~~~
prog.cpp:6:26: error: ‘ComponentModel’ is not a namespace-name
  using namespace System::ComponentModel;
                          ^~~~~~~~~~~~~~
prog.cpp:6:40: error: expected namespace-name before ‘;’ token
  using namespace System::ComponentModel;
                                        ^
prog.cpp:7:18: error: ‘System’ has not been declared
  using namespace System::Collections;
                  ^~~~~~
prog.cpp:7:26: error: ‘Collections’ is not a namespace-name
  using namespace System::Collections;
                          ^~~~~~~~~~~
prog.cpp:7:37: error: expected namespace-name before ‘;’ token
  using namespace System::Collections;
                                     ^
prog.cpp:8:18: error: ‘System’ has not been declared
  using namespace System::Windows::Forms;
                  ^~~~~~
prog.cpp:8:35: error: ‘Forms’ is not a namespace-name
  using namespace System::Windows::Forms;
                                   ^~~~~
prog.cpp:8:40: error: expected namespace-name before ‘;’ token
  using namespace System::Windows::Forms;
                                        ^
prog.cpp:9:18: error: ‘System’ has not been declared
  using namespace System::Data;
                  ^~~~~~
prog.cpp:9:26: error: ‘Data’ is not a namespace-name
  using namespace System::Data;
                          ^~~~
prog.cpp:9:30: error: expected namespace-name before ‘;’ token
  using namespace System::Data;
                              ^
prog.cpp:10:18: error: ‘System’ has not been declared
  using namespace System::Drawing;
                  ^~~~~~
prog.cpp:10:26: error: ‘Drawing’ is not a namespace-name
  using namespace System::Drawing;
                          ^~~~~~~
prog.cpp:10:33: error: expected namespace-name before ‘;’ token
  using namespace System::Drawing;
                                 ^
prog.cpp:15:2: error: expected unqualified-id before ‘public’
  public ref class Form2 : public System::Windows::Forms::Form
  ^~~~~~
prog.cpp:65:1: error: expected ‘}’ at end of input
 }
 ^
stdout
Standard output is empty