I know that by using classes and the char-datatype, we can represent our own datatype and overload operators for it. Say arbitrary large integers.

But, however, this takes 1 byte per digit which is really really bad.

So would it be possible to allocate n bytes of memory and use all these bytes of memory to represent a number in C++..? Note that the number could be large enough that it cannot be represented by standard types as they do not have enough bytes to represent the number.

So that 10 bytes would let you represent 2^10 numbers instead of 10digits?

Because that's how interpreters support arbitrary large numbers right, they allocate enough memory to store the number if it's larger than a particular number.