I've got a constant structure array that represents a song, i declare another const struct of the same type and make this constant structure array = the other one, what is the correct code
Code:
//**************************
typedef struct
{
int note;
int beats;
}Note_Beats;
//**************************
//***********************************************
//***************Song list***********************
//***********************************************
//********When The Saints Go Marching In*********
#define NumberOfBeats_Saints 16
const Note_Beats Saints[NumberOfBeats_Saints] = { {C6, 1}, {E6, 1}, {F6, 1}, {G6, 5}, {C6, 1}, {E6, 1}, {F6, 1}, {G6, 5}, {C6, 1}, {E6, 1}, {F6, 1}, {G6, 2}, {E6, 2}, {C6, 2}, {E6, 2}, {D6, 5} };
//***********************************************
//**************Choose Song Here*****************
#define NumberOfBeats NumberOfBeats_Saints
const Note_Beats Song = Saints;
//***********************************************
I am getting the error where I decalare "Song" and make it = "Saints"
ie at this code:
Code:
const Note_Beats Song = Saints;
help please!