I'm trying to make a game in C++ using graphics. I'm using code blocks. I'm trying to make a screen where the player tells his/her name or username. I want to make each letter they press appear but I can't. This is what I've done so far
void user_engleza()
{
    cleardevice();
    while(true)
    {
        char s[101];
        ifstream f("nume.in");
        ofstream g("nume.in");
        bool ok = false;
        char litera[1], nume[101];
        int x, y, j = -1;
        settextstyle(6, HORIZ_DIR, 7);
        outtextxy(300, 100, "Your name will be");
        x = 700;
        y = 150;
        while(ok == false)
        {
            cin >> litera[0];
            g << nume[++j];
            outtextxy(x, y, litera);
            y = y + 100;
            if(GetAsyncKeyState(VK_RETURN)) ok = true;
        }
    }
}
Thank you for help anticipate.
 
    