Results 1 to 7 of 7
  1. #1
    KissU's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    107
    Reputation
    10
    Thanks
    14
    My Mood
    Blah

    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?
    "More suicides in world make there are less suicides in the world"


  2. #2
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Code plz ?

  3. #3
    KissU's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    107
    Reputation
    10
    Thanks
    14
    My Mood
    Blah
    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^ ?
    "More suicides in world make there are less suicides in the world"


  4. #4
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    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.

  5. #5
    KissU's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    107
    Reputation
    10
    Thanks
    14
    My Mood
    Blah
    You mean
    Code:
         
    void set(String^ value)
        {
            m_value = value;
        }
    Get from MSDN. I'm gonna try it.
    Last edited by KissU; 11-20-2011 at 05:19 PM.
    "More suicides in world make there are less suicides in the world"


  6. #6
    KissU's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    107
    Reputation
    10
    Thanks
    14
    My Mood
    Blah
    Solved. I converto to char* and to String^ again to edit . Thanks Anyway
    "More suicides in world make there are less suicides in the world"


  7. #7
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Alright. Closed then.

Similar Threads

  1. [SOLVED][Question]External BoxEsp V4.32 Sniper Aimbot + Strings Esp Aimbot Question.
    By bryn1000 in forum Call of Duty Modern Warfare 2 Help
    Replies: 11
    Last Post: 07-05-2010, 05:12 PM
  2. [Help]String to Hex[Solved]
    By ppl2pass in forum Visual Basic Programming
    Replies: 5
    Last Post: 04-27-2010, 07:55 AM
  3. [Help]String,Remove blanks[Solved]
    By ppl2pass in forum Visual Basic Programming
    Replies: 3
    Last Post: 04-25-2010, 09:02 AM
  4. [help]Convert String to Color[Solved]
    By mnpeepno2 in forum Visual Basic Programming
    Replies: 10
    Last Post: 04-02-2010, 01:08 PM
  5. [Solved]System
    By balryk12 in forum Combat Arms EU Discussions
    Replies: 8
    Last Post: 03-06-2010, 10:04 AM