标签: .net struct c++-cli
如何将c ++ struct转换为Object?
struct FileInfo{ float width, height; }; FileInfo *info = (FileInfo*)malloc(sizeof(FileInfo)); Object ^obj = (Object^)info;
错误'type cast':无法从FileInfo *转换为'System :: Object ^
更新我需要将Object ^转移到该方法。我无法修改方法。 (这是api)