P
peter.mcclymont
I am used to C++, but not managed C++.
All I want to do is write a class to reverse a string. Don't ask me
why, it is not for a real world application. Actually it is for a test.
My code looks like this at the moment. It is not finished yet of
course, but I am having trouble compiling, it says this,
..\Reverse.cpp(8) : error C4980: '__gc' : use of this keyword requires
/clrldSyntax command line option
Am I on the right track?
#include "stdafx.h"
#include <vcclr.h>
using namespace System;
public __gc class ReverseString
{
public:
ReverseString() {};
~ReverseString() {};
private:
String ^szString;
};
int main(array<System::String ^> ^args)
{
ReverseString reverseString();
Console::WriteLine(L"Hello World");
return 0;
}
All I want to do is write a class to reverse a string. Don't ask me
why, it is not for a real world application. Actually it is for a test.
My code looks like this at the moment. It is not finished yet of
course, but I am having trouble compiling, it says this,
..\Reverse.cpp(8) : error C4980: '__gc' : use of this keyword requires
/clrldSyntax command line option
Am I on the right track?
#include "stdafx.h"
#include <vcclr.h>
using namespace System;
public __gc class ReverseString
{
public:
ReverseString() {};
~ReverseString() {};
private:
String ^szString;
};
int main(array<System::String ^> ^args)
{
ReverseString reverseString();
Console::WriteLine(L"Hello World");
return 0;
}