[問題] opengl在windows form的error:mixed type not support

看板C_and_CPP作者時間12年前 (2011/10/05 16:21), 編輯推噓2(203)
留言5則, 3人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) vc++ 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) opengl 問題(Question): 出現error4368 因為宣告 GLYPHMETRICSFLOAT gmf[256]; // Storage For Information About Our Outline Font Characters 造成 error C4368: cannot define 'gmf' as a member of managed 'OpenGLForm::COpenGL': mixed types are not supported 請問有大大可以告訴我怎麼辦嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.118.175.34

10/05 16:48, , 1F
要宣告成pointer,然後在form的constructor裡面再new出來
10/05 16:48, 1F

10/05 16:50, , 2F
原因是Managed class中不能有Native C++的member
10/05 16:50, 2F

10/05 20:13, , 3F
10/05 20:13, 3F

10/05 20:18, , 4F
還是看不懂QQ
10/05 20:18, 4F

10/05 20:33, , 5F
解決了 謝謝
10/05 20:33, 5F
文章代碼(AID): #1EZ1DzyA (C_and_CPP)