Hi guys,
I created a simple program which combines a managed and unmanaged c++ syntax. I have encountered a problem in compiling this program. The compiler told me to add /clr:oldSyntax but when I added it, the compiler cannot interpret the managed syntax. Hope you can help me.
#include "stdafx.h"
using namespace System;
__nogc class Container
{
int m_value;
public:
Container() : m_value(0) {}
void setValue(int* a_value) { m_value = *a_value; }
const int& getValue() { return m_value; }
};
int main(array<System::String ^> ^args)
{
Console::WriteLine(L"Hello World");
return 0;
}