System::String^ Encryption [Solved]

Posts 17 of 7 · Page 1 of 1
System::String^ Encryption [Solved]

Hey guys I'm working at a little project and started in Visual Studio with CLR
It encrypt a text a decrypt , so i'm getting some errors.
I have a code for text encryption but cant use with String^ (managed type)
I cant convert it to char * so my code dont work.Can someone help me?
Code plz ?
I'm not on the pc that I usually use but its like:
Code:
 void encrypt ( char str[] )
{
for(int i =0;str[i] != '\0'; i++) ++str[i];
}
So basically it incremment the chars and 'a' turn on 'b', 'b' on 'c', ...
But I cant use with String^ It raise the error C3070 'property': System::String::default does not have a 'set' method
Something like this D:, So how can I use with String^ ?
That error means, that you can not set a specified index of String variable to something new. You can only read it. You will need another String^ to reflect the changes and finally returning that String.
You mean
Code:
     
void set(String^ value)
    {
        m_value = value;
    }
Get from MSDN. I'm gonna try it.
Solved. I converto to char* and to String^ again to edit . Thanks Anyway
Alright. Closed then.
Posts 17 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?