1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
string generateSong(string list[], int num)
{
string output;
char *CTT[1] = "connected to the ";
char * song[100] = {"Dem bones, dem bones, dem...dancing bones\n",
"Dem bones, dem bones, dem...dancing bones\n",
"Dem bones, dem bones, dem...dancing bones\n",
"\t Doin' the skeleton dance\n",
"The 0 bone is "+CTT +"1 bone,\n",
" The 1 bone is "+ CTT + "2 bone,\n",
" The 2 bone is "+ CTT + "3 bone,\n",
"\t Doin' the skeleton dance\n",
" The 3 bone is "+ CTT + "4 bone,\n",
" The 4 bone is "+ CTT + "5 bone,\n",
" The 5 bone is "+ CTT + "6 bone,\n",
"\t Doin' the skeleton dance\n",
"\t Shake your hands to the left.\n",
"\t Shake your hands to the right.\n",
"\t Put your hands in the air.\n",
"\t Put your hands out of sight\n",
"\t Doin' the skeleton dance\n",
" The 7 bone is "+ CTT + "8 bone,\n",
"\t Doin' the skeleton dance!"};
int u = 0;
for(int i = 0; i < 40; i++)
for (int b = 0;b < sizeof(song[i]) ;b++)
if (song[i][b] == u)
{
song[i][b] = list[u];
u++;
break;
}
output = song;
return output;
}
|