fork download
  1. class MyFormTemplate{
  2. };
  3.  
  4. class abcd:public System::Windows::Forms::Form{
  5. //自己建的class不能繼承
  6. // error C3625: 'abcd': 不可以從 Managed 型別 'System::Windows::Forms::Form' 中衍生
  7. // Unmanaged 型別
  8. // 1>c:\...\system.windows.forms.dll : 請參閱 'System::Windows::Forms::Form' 的宣告
  9. ...
  10. };
  11. //public ref class Form1 : public System::Windows::Forms::Form 這是原來的
  12. public ref class Form1 :public MyFormTemplate
  13. {
  14. //error C2811: 'test::Form1' : 無法從 'MyFormTemplate' 繼承,ref 類別
  15. // 只能從 ref 類別或介面類別 繼承
  16. ...
  17. };
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4: error: ‘System’ has not been declared
prog.cpp:4: error: expected `{' before ‘Form’
prog.cpp:4: error: function definition does not declare parameters
prog.cpp:12: error: expected unqualified-id before ‘public’
stdout
Standard output is empty