getint-like function You probably know the following problem: You have written a small program that runs in your console and want the user to enter something. of course, it is very inconvenient when the user types the wrong things, so we have to prepare for any small child hacking like a madman on the keyboard.
Most functions wait for a valid input, which results in the problem that nasty line breaks occur when the user ONLY presses the enter key.
the problem is also normally easy to solve under Linux: read a character with getchar, determined the position of the cursor with the ANSI escape sequences and provided the whole thing with a do while loop.
BUT: I was not able to find a simple function to read in numbers in the same elegant way. The function must be able to read in numbers, but also be able to prevent line breaks. to achieve this, I used getchar and store the characters in a char array, whose indices I then convert to the corresponding numbers, which I then add to the actual number.
But maybe there is an easier way? or you have ideas how to optimize the function?
#include &lt;iostream&gt;
#include &quot;TheGameHeaders.h&quot;

#define CLEAR_LINE printf(&quot;\033[K&quot;)
#define POSITION(Ze, Sp) printf(&quot;\033[%d;%dH&quot;, Ze, Sp)
#define CLEAR printf(&quot;\033[2J&quot;)


int getint(int pos_ze, int pos_sp, int qntty_of_incs)
{   
    int i = 0;
    char fake_nbr;
    char fake_nbrs[qntty_of_incs];

    int real_nbr = 0;
    int real_nbrs[qntty_of_incs];


    do
    {
        POSITION(pos_ze, pos_sp);
        while((fake_nbr = getchar()) != '\n')
        {
            if(fake_nbr == '0' || fake_nbr == '1' || fake_nbr == '2' || fake_nbr == '3' || fake_nbr == '4' || fake_nbr == '5' || fake_nbr == '6' || fake_nbr == '7' || fake_nbr == '8' || fake_nbr == '9')
            {
                if(i &lt;= (qntty_of_incs-=1))
                {
                    fake_nbrs[i] = fake_nbr;
                    i++;
                    qntty_of_incs++;
                }
                else
                {
                    return 1;
                }
            }
            else
            {
                return 0;
            }
        }
    }
    while(i &lt; 1);

    for(int a = 0; a &lt; i; a++)
    {
        fake_nbrs[a] -= '0';
        real_nbrs[a] = fake_nbrs[a];
    }

    int i_fix = i;
    int i_fix_2 = i-=1;

    for(int a = 0; a &lt; i_fix; a++)
    {
        i = i_fix_2;
        real_nbrs[a] *= pow(10, i-=a);
    }

    for(int a = 0; a &lt; i_fix; a++)
    {
        real_nbr += real_nbrs[a];
    }

    return real_nbr;
}

oh and pow is a simple function:
int pow(int base, int exponent)
{

    if(exponent == 0)
    {
        return 1;
    }

    exponent -= 1;
    int fixBase = base;

    for(int i = 0; i &lt; exponent; i++)
    {
        fixBase *= base;
    }

    return fixBase;
}
Overview
Looks like you are reading data from the standard input and converting to a number. There is already code for that:
int val;
std::cin &gt;&gt; val;

You use C functionality throughout this code (printf/arrays/getchar) where there are better C++ alternatives (std::cout/vector/std::cin). A lot of this work can be delegated to standard functions.
Code Review
#include &lt;iostream&gt;

What are these headers and what do they define?
#include &quot;TheGameHeaders.h&quot;


This is very terminal specific.
#define CLEAR_LINE printf(&quot;\033[K&quot;)
#define POSITION(Ze, Sp) printf(&quot;\033[%d;%dH&quot;, Ze, Sp)
#define CLEAR printf(&quot;\033[2J&quot;)

A lot of terms might support this but it is not universal. Have a look at ncurses library; that will provide a terminal-neutral way to achieve all this. ncurses, and curses before it, look up these control characters from their terminal databases and retrieve the terminal-specific escape codes.

This is not standard C++:
    char fake_nbrs[qntty_of_incs];

If you want dynamic (run time sized) arrays, then you should be using std::vector&lt;&gt;

We have standard functions for checking for numbers:
        while((fake_nbr = getchar()) != '\n')
        {
            if(fake_nbr == '0' || fake_nbr == '1' || fake_nbr == '2' || fake_nbr == '3' || fake_nbr == '4' || fake_nbr == '5' || fake_nbr == '6' || fake_nbr == '7' || fake_nbr == '8' || fake_nbr == '9')

Have a look at:
   std::isdigit()


Returning valid integer numbers to indicate failure conditions is probably not a good idea.
                else
                {
                    return 1;
                }
            }
            else
            {
                return 0;
            }

How can the user of your code tell if this is real user input or an error?

You use several loops to convert the each number to its correct value. Why not do this in a single loop?
    for(int a = 0; a &lt; i; a++)
    {
        fake_nbrs[a] -= '0';
        real_nbrs[a] = fake_nbrs[a];
    }

    int i_fix = i;
    int i_fix_2 = i-=1;

    for(int a = 0; a &lt; i_fix; a++)
    {
        i = i_fix_2;
        real_nbrs[a] *= pow(10, i-=a);
    }

    for(int a = 0; a &lt; i_fix; a++)
    {
        real_nbr += real_nbrs[a];
    }

Seems simpler like this:
   int result = 0
   for(int a = j; a &gt; 0; a--) {
       result = (result * 10) + (fake_nbrs[a - 1] - '0');
   }


There already exists a standard power function in the maths library.
int pow(int base, int exponent)


Nice touch. Most people forget this part.
    if(exponent == 0)
    {
        return 1;
    }