But, I wanted to know how to store an object into the array. According to Aceix, I can do it if I overload the operator=, however; I don't know what I would put in the brackets for that.
Unless you're saying I can somehow do this: Foo string Meep, which doesn't make sense.
But, I wanted to know how to store an object into the array. According to Aceix, I can do it if I overload the operator=, however; I don't know what I would put in the brackets for that.
That's not what he meant. You can not store a Foo object in a string array. It's surprising you don't understand that.
If I try to understand your code, it seems like your Foo class is supposed to contain something like a chess board and the Bar array contains the name of the pieces for each position.
In that case the correct code is Bar[i][j] = Piece.Name;
But it's terrible design. There's absolutely no reason to use a Foo object - which contains a full board - to represent a piece when the only thing you want is the piece's name !