I have a struct declared as follows:
#ifndef PLAYLIST_H
#define PLAYLIST_H
#include <iostream>
#include <string>
#include <vector>
#include "playlistitem.h"
#include "song.h"
#include "time.h"
struct Playlist {
std::vector<Song> songs;
Time cdTotalTime;
int totalTime;
};
and struct Song declared in another file:
#ifndef SONG_H
#define SONG_H
#include "playlist.h"
#include "time.h"
struct Song {
std::string title;
std::string artist;
std::string album;
int track;
Time length;
};
I have both struct definitions in headers, and both are #included as they should be.
When I compile I get an error at
std:vector<Song> songs;
error 'Song' was not declared in this scope
What am I missing?
Song's definition file in the file, definingPlaylist? And that it's in the same namespace?