I am trying to figure out for my physics simulator how to give my object name a variable or something, ill show an example and the compiler flags it an error but all i am trying to do is pass it the value not the variable
long atomID = 0;
atom atomID;
struct atom
{
short radius;
}
im just trying to get the object of atom to be called 0 so that i can reference all of my objects if lets say the simulator has 100 atoms operating in it at once. but doing it like this I want to be able to create all the atoms like this by just incrementing the atomID so i have a new variable name or something. does anyone have ideas for implementing an idea like this.