How to replace a character to a another on a char [closed]


I’m trying to make a void for draw a text in a game, the problem is the text look like this: M.a.i.n. .M.e.n.u

It put a . after every characters, I have already do a code on C# for fix this, but i don’t know how to make that for C++.

The . need to be changed to this: "{$content}" or by hex "00"

Also, my code is a plugins for a console, i can’t use string because it’s return me a error:

error: L0303: error generating PRX (prx-fixup failed)

error: L0064: Lunking aborted

but i can use: strchr or strcpy

here is the code i made on C# for you see how it’s look like

private string fixText(string fixStr)
    int length = fixStr.Length;
    int startIndex = 1;
    int num3 = 0;
    while (true)
        if (num3 >= length)
            fixStr = fixStr.Replace(".", "{$content}");
            return (fixStr + "{$content}{$content}{$content}");
        fixStr = fixStr.Insert(startIndex, ".");
        startIndex += 2;

Source: Windows Questions C++