Hi,
I am really confused. Everywhere I read on the internet, I see that the += operator is part of the string class. I want to add something onto the end of the string. Why does my code not compile? I keep getting the C2088 error: illegal for class.
If the solution has to be completely redone, here is the file:
#include "stdafx.h"
#include <string>
using namespace std;
using namespace System;
String ^Convert(String ^OriginalText) {
string Array[13];
String ^ConvertedText;
for (int Loop = 0; Loop < 13; Loop++)
{
ConvertedText += Array[Loop];
ConvertedText += '\n';
}
return ConvertedText;
}
I just took out the unnecessary bits. Do I need a variant of the concat function? Please help!