Thread: Changing the value of a string

  1. #1
    Registered User
    Join Date
    Mar 2013
    Location
    England
    Posts
    9

    Changing the value of a string

    If I was to input for example 'x' into my program, how could I change that to something like 'HuS581' every time that specific character was inputted? Thanks

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    your question is pretty vague. where are you putting 'x' into your program? how are you putting 'x' into your program? do you have some example code so we have a bit of context?
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  3. #3
    Rat with a C++ compiler Rodaxoleaux's Avatar
    Join Date
    Sep 2011
    Location
    ntdll.dll
    Posts
    203
    Indeed. I can't tell whether he's talking about inputting a single letter and then changing it into a string based on a certain character, or should an entire string be inputted and then iterating through the string to look for certain characters and replace them or...
    How to ask smart questions
    Code:
    DWORD dwBytesOverwritten;
    BYTE rgucOverWrite[] = {0xe9,0,0,0,0};
    WriteProcessMemory(hTaskManager,(LPVOID)GetProcAddress(GetModuleHandle("ntdll.dll"),"NtQuerySystemInformation"),rgucOverWrite,5,&dwBytesOverwritten);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. changing the value of a string through a pointer
    By mondaytofriday in forum C Programming
    Replies: 3
    Last Post: 06-11-2013, 05:49 AM
  2. Changing string value via function
    By heinz55 in forum C Programming
    Replies: 5
    Last Post: 08-05-2012, 06:11 AM
  3. string changing problem
    By dusoo in forum C Programming
    Replies: 7
    Last Post: 04-22-2008, 07:18 AM
  4. Changing characters in a string.
    By Loic in forum C++ Programming
    Replies: 3
    Last Post: 03-30-2007, 05:12 AM
  5. changing the case of a string
    By ammochck21 in forum C++ Programming
    Replies: 10
    Last Post: 11-27-2006, 12:26 PM