For my assignment we HAVE to use typedef to declare these. I tried a multitude of combinations using typedef, but then the rest of my code that uses songId and typeOfSong is not valid. How would I set up the correct arrays using typedef?
a typedef declaration has exact same syntax as a variable declaration, except for the word typedef in it:
1 2
char typeOfSong[15]; // defines an object of type "array of 15 char" called "typeOfSong"
typedefchar typeOfSong[15]; // defines a type alias of the type "array of 15 char" called "typeOfSong"