char *octets = (char *) calloc (1, Ms);
The 'calloc' function is from plain C, not C++. It allocates memory and zeroes it. Because it's from C, some C++ programmers might avoid it. If so, you could accomplish the same like this:
char *octets = new char[Ms];
for (int i = 0; i < Ms; ++i) octets[i] = 0;
There may also be some spiffy way to do with with the C++ Standard Template Library.
1)
I'm a little confused because your equation: "-Ms = 64*2^m" has odd capitalization and no unknowns
I think what you are getting at is that powers of 2 can be done using the left shift (<<) operator in C++.
64*2^m can be rewritten as 64<
If you want to get the m or the s on the other side watch out for integer round off.
2)
char *buff;
buff = (char*) calloc(m*s,sizeof(char));
Sorry for bad formatting, but i didn't wanted M and S to be multiplied, instead, s is just a little bit below M...
[attaching image of the equation]...
The left side of the equation is much more confusing...