Happy Friday everyone. This program is 1/3 complete, but it still runs. I have to define a class and declare an array of strings with 7 colors. I set up a default constructor and initialized my array there, and then made a function to print the members of the array, but this part is not working. Can someone tell me why? I know I can just declare a string array in the int main and make a parameterized function in the class but surely there must be a way to do it the other way?
The rest of the program is creating a function that takes a random index member and couts it, but Im gonna try that on my own.
You have to use an initialization list to conveniently assign all indices.
The problem is that the array is already initialized in the body of the constructor, so you can't do the array assignment after it's already been initialized.