Each of these functions requires you to iterate over a buffer and do something to each cell of the buffer. The most straightforward way to approach this is to use a for-loop (http://www.cplusplus.com/doc/tutorial/control/#for).
1 2 3 4 5
for (int i = 0; i < bufferSize; i++)
{
// do something to buffer[i]
buffer[i] = 0;
}
This particular example sets each item in buffer to 0 (i.e. "zeroes" the buffer). You will want to do other things to each cell of a buffer depending on which function you're writing, but in each case you will use a for-loop to traverse one cell at a time.