![]() |
|
#1
|
|||
|
|||
MP3 Song collection... deleting song from arrayHey guys, I'm new to C++ and I need help completing a project for the class. Basically I've created a mp3 music database, where someone can enter 3 songs and the title, artist, and genre for each. I've got everything pretty much all set, except I cant figure out how I would delete a song from the list (when op==7), and move the other songs up.
Someone please help! The first part of the code was helper code provided by our instructor, and he said we might need "currentsong" later. Anyway here's the code. CPP / C++ / C Code:
|
|
#2
|
|||
|
|||
Re: MP3 Song collection... deleting song from arrayHi Im new to this Forum too
I have few words to say : To let people easy to read you code ,and for u when you want to review and edit it, I have some recommedation Quote:
For Example CPP / C++ / C Code:
Ive looked through your Code , your list is an Array of Struct ,not a "Link List" , so to delete a song from array we need to do few more works. Code:
PS: Sometimes we need declare a global Variable to keep track of the current number of songs in the Collection EX: MAX_SONGS =20; int NumberOfSongs May be in your list right now only have 10 songs for ex. You'll see in some case you need this Variable |
|
#3
|
|||
|
|||
Re: MP3 Song collection... deleting song from arrayI really appreciate all you wrote here, but excuse my ignorance, but can you show me how this would exactly go into my code?
I really need to be spoon fed this stuff! haha Could I make the delete a song work with the code I have, or would i have to rewrite the whole thing? |
|
#4
|
|||
|
|||
Re: MP3 Song collection... deleting song from arrayHey I ended up using this to get it to work
CPP / C++ / C Code:
|
|
#5
|
|||
|
|||
Re: MP3 Song collection... deleting song from arrayBelow is a sample program that works...
I recommend you to make the program more efficient.... CPP / C++ / C Code:
Think differently to make the program usable universally for ex, In the above program we are not accepting string, we are accepting a word. Similarly there are many areas you have to look for. This is just a prototype, how a program should generally look like... Last edited by LuciWiz : 10-Dec-2007 at 13:02.
Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
|
|
#6
|
|||
|
|||
Re: MP3 Song collection... deleting song from arrayCPP / C++ / C Code:
|
Recent GIDBlog
Flickr uploads of IA pictures by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compiling errors in binary tree code | rahul_2550 | C Programming Language | 1 | 22-Mar-2007 15:07 |
| Sort an array of structures | sassy99 | C Programming Language | 10 | 15-Feb-2007 07:46 |
| Need help deleting the last element in the array | headphone69 | C++ Forum | 2 | 15-Mar-2006 19:31 |
| template comiling problems - need expert debugger! | crq | C++ Forum | 1 | 01-Feb-2005 21:26 |
| Creating N string | gwk | C Programming Language | 3 | 20-Jul-2004 23:27 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The