My Class PlaylistTrack is a subclass of Track (extends that class):
#include "track.h"
#include "album.h"
class PlaylistTrack : public Track //extends Track Class
{
private:
Album & newAlbum; //or
Album * newAlbum; //?
public:
PlaylistTrack(void);
~PlaylistTrack(void);
};
I’m hoping i have the correct syntax.
How do you go about adding a reference or pointer to the Album on which a certain track occurs?
I don’t really understand exactly what you are asking, but it sounds like you want to have a way to get the album from a PlaylistTrack.