问题
Ehh, I'm having an issue which i don't understand...
class ManagedGlobals
{
public: gcroot<Editor^> MainEditor;
};
Why does my compiler give me:
syntax error : missing ';' before '<'
Why?
回答1:
Did you do this?
#include <vcclr.h>
using namespace System;
Here's a full example of using gcroot.
来源:https://stackoverflow.com/questions/11567792/c-syntax-error-missing-before