Arrays and Classes?
<p>I am new to C++ and working on a project where I have array of instances of a class, and within that class I have a struct that within that I have a function. 
How do I use that function within my main code block. I tried </p>

<pre><code>class artwork {
    struct art {
        // the struct art contains important information such as artist, title and medium. 
    private:
        string artist;
    public:
        void setArtist(string values);
        string getArtist();
    };

    void artwork::art::setArtist(string values) {
        artist = values;
    }

int main (){
    artwork myartwork[500];
    for (int i = 0; i &lt; 500; i++) {

        ///-----------------------------------
        ///-----------------------------------
        // below is where the error occurs? How do I reference setArtist?
        ///-----------------------------------
        ///-----------------------------------

        cout &lt;&lt; myartwork[0].art.setArtist("Tim");
    }
    system("pause");
    return 0;
}
</code></pre>