My task is to write a c++ program that will generate an n-dimensional cube. Each point is a bit string, and connected to each point by edges are n other points, where n is the dimension. The other points are one bit changed from the original bit string. For example:
Would define a square. Making a cube would entail duplicating the square, adding a 0 bit to the end of the original points, and adding a 1 to the end of the new points, then joining the two squares together into a cube.
I dont know how to dynamically allocate an array inside an object, which would help. Can anyone give me any pointers as to the best way to approach this? Thanks,