Hi!
I'm really new to all this so please excuse me if I'm not providing enough information for anyone to answer my question. I'm getting this error:
error C2079: 'Playlist::PLarray::playlists' uses undefined class Playlist
and it's referencing a line in my PLarray.hpp file-> see ***
PLarray.hpp:
#include <iostream>
#include <cassert>
#include "style.hpp"
#include "Playlist.hpp"
class PLarray
{
public:
PLarray()
//creates this PLarraywith the default values
{}
~PLarray()
//destroys this PLarray object
{std::cout << "In ~PLArray()";}
const Playlist operator [] (unsigned IN location) const;
//returns a specified playlist
Playlist& operator [] (unsigned IN location);
//returns access to a specified playlist
enum {capacity = 10};
///***
private:
Playlist playlists[capacity];
};
#endif
And here is my implementation file that I think it's also referring to:
PLArray.cpp
#include "PLArray.hpp"
#include <cassert>
using namespace std;
const Playlist PLarray:: operator [] (unsigned location) const
{ assert (location < capacity);
return playlists [location];
}
Playlist& PLarray:: operator [] (unsigned location)
{ assert (location < capacity);
return playlists [location];
}
I'm stumped. Any ideas?