Hey guys, im trying to write some code for a micro-controller outputs to a little speaker a song that is programed in C, but I want to make it so that it can play other songs just by changing where its says "change song here", but I get an error when I say
"
Code:
const Note_Beats Song = Saints;
" why??? and how can I fix this???
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;
//***********************************************