You (a) cannot return an array like that and (b) have wrong return type.
You do not even need the function anymore.
Just do char buff[4]; //or char buff[5] = { 0 }; if you want to threat it as c-string and then do std::cin.read(buff, 4); //or use whichever stream you need every time you need another portion of characters.