I’m trying to copy one vector to another using `std::copy“
vector<note_name> notes = AppSettings::getAllNotes();
copy(notes.begin(), notes.end(), song.noteList);
The function getAllNotes() returns a vector<note_name> and noteList is a public member of the same type. When I try to run I’m getting:

So I think there’s some problem with the fact that the vector uses the type note_name, but I don’t know how to fix it. Any ideas?
You need an output iterator, too. If
noteListalready has the required size, say:If it is empty and you want to insert the copied range,
#include <iterator>and say:However, as @Mike points out, it may be even simpler to say one of the following: