If you wanted to put ints, doubles, strings into your own container class how would you do it?

Aside from CompuChip's suggestion, you also need to define the size and the orientation of your "words".

My suggestion to you is if you are doing your development in something C/C++, you should typedef your doubles, ints, and strings so that they are always in the same format regardless of the platform.

Typically what happens is that an int is platform dependent. On a 32-bit platform is 32 bits and on a 64-bit platform it is 64-bits. The best way to get around this is to define something like INT32 which is guaranteed to 32 bits regardless of what platform you execute the code on.

Also with strings, are they fixed length or are they allocated on the heap? If they are allocated on the heap, then your string data will not be able to stored in your structure as a TYPE or struct definition. One way around this is to use a large flat area of memory that is the maximum size of a string. Languages like BASIC can do this, and it's very easy to do this with a struct definition in C/C++.