So i have a program that reads mp3 files from the folder i run it in... I need to be able to read mp3's from sub directories does anyone know how to do this..?
Scan is the only way i know how to find the mp3 files in a folder... it is working for me i just dont understand how to read the subdirectories.. This is my first semester and i am finding it hard to do this? Is it just me or is it complicated? Let me know if you can help!
You'll have to explain where the scan function comes from or show its source code.
And no, it's not complicated. If you find a directory instead of a regular file, you'll just have to scan that directory too. You're familar with recursion, right?
int main( int argc, char* argv[]) {
string switches;
string folder;
string filespec = "*.mp3";
intptr_t hFile;
_finddata_t fd;
//char filename[100];
cout << "Please enter one of the following:" << endl;
cout << "-v for tag contents" << endl;
cout << "-h for help" << endl;
cout << "-r to process the folder recursively"<< endl;
If it helps i can add you on msn or something... If you can help me with some of these problems i will actually pay you on paypal i have been working on this for over 10 hours and im very po'ed that it is due in an hour and i suck lol
Well, I suppose the && last != ':' is wrong, that would result in looking for subdirectories such as "C:MP3s".
If it doesn't work for other directories either, there's probably another bug. Can't test the code without the "io.h" file.
athar i will send you the code on msn if you would like? i have two other problems if you can help me with these i will seriously pay you lmao $20 -.- i am dieing here!
I don't need payment if the problem is easy to fix (which I'm sure it is).
It probably would be easier to just post the io.h file here (or on codepad if the file is large).
Well, you're including it at the top. Isn't it part of your program? Neither g++ nor mingw finds the file.
Edit: ah, wait a sec. It does come with a newer version of mingw (4.4).
That was an example the teacher had done and i used it in my program because i had NO idea how to do it any other way... He doesn't explain anything to us... Just throughs code on the board and expects us to know it VERY SAD... I understand java perfectly because the teacher shows us every part of the code and what it does and how to write it... Wish i had the same teacher for c++.... I am screwed! lol
Awesome my friend has some parts i don't have and i have parts he doesn't have... rewriting my code can you check back in like 20 mins? PLEASE you are like the only person that helps lol thanks so much man!