Say I have a class with a public variable (bad practice, I know), and in the main function, I want to create 3 class objects, how could I assign different values to that class variable?, something like:
class C{
public:
int foo;
};
int main(){
C co[3];
co[0]->foo = 20;
co[1]->foo = 40;
co[2]->foo = 80;
}