Hi!
I have to make a program, wich lists all files in current dir, and then save all file names into an array.
My program doesn't work ! Can you tell me why?
Thanks a lot
Hi!
I have to make a program, wich lists all files in current dir, and then save all file names into an array.
My program doesn't work ! Can you tell me why?
You need to tell us why you think it's wrong? We don't know the symptoms you're seeing.
One thing I notice though is you are not saving the file name correctly. Once you read the second file, the first name is gone. You need to move the entire name into your list, not just the pointer. Be sure you redefine filenames so it can hold the string properly.
You need to tell us why you think it's wrong? We don't know the symptoms you're seeing.
One thing I notice though is you are not saving the file name correctly. Once you read the second file, the first name is gone. You need to move the entire name into your list, not just the pointer. Be sure you redefine filenames so it can hold the string properly.
One thing I notice though is you are not saving the file name correctly. Once you read the second file, the first name is gone. You need to move the entire name into your list, not just the pointer. Be sure you redefine filenames so it can hold the string properly.
Could you please explain to me how this is done? I wanted to save some file names into an array so I could manipulate the text in the files, but I can't get past this problem and I have tried to save the entire name in the array but I continually get casting messages and segmentation faults. It runs as is, but the array only contains the last file name. I'm using the same program from above...
Only if you'll bother to read The Rules as requested when you registered, and the post entitled Read Me: Read This Before Posting. Also, please tell us what we could have done to express the importance of reading the rules first?
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.