![]() |
|
#1
|
|||
|
|||
Accessing .dat files within a folderBelow, I have c/p my code. The program is supposed to input a folder name, and inside that folder there are two .dat files with an array of data in each that I am supposed to read and output the average and the maximum values in each. Can someone help me out please? Also, I do not know what to include in my arguments in my first three function definitions...because when I uncomment my function calls, I get errors that refer to those function arguments. Please help ASAP! Thank you in advance for all the help!
CPP / C++ / C Code:
Last edited by admin : 03-Apr-2009 at 01:22.
Reason: Please insert your example C/C++ codes between [CPP] and [/CPP] tags
|
|||
|
#2
|
|||
|
|||
Re: Accessing .dat files within a folderQuote:
Make the program tell you exactly what it is working with at each step.. I think you should never assume that files have been opened properly, so trap error conditions and give the user some information. Maybe you want to let the program attempt to recover (by letting the user try again with other input), or maybe you just want to abort the program. For example CPP / C++ / C Code:
Note that when printing debugging information, I usually put some kind of bracket around the strings so that I can see if there are any leading or trailing spaces. So the output from my debugging statement might look like: Code:
Quote:
Well, first of all, give the specification of what the function is supposed to do. List the arguments and their meaning and describe the return value (if the return type isn't void). Do this (and show us what you did) for whatever function you are having problems understanding, and maybe someone can help. Regards, Dave |
Recent GIDBlog
Once again, no time for hobbies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to copy all files from one folder to other | darshan.yadav | C++ Forum | 5 | 29-Apr-2008 05:17 |
| Reading multiple files in a folder | sitha | C++ Forum | 4 | 13-Jun-2007 05:25 |
| C++ for moving files across network? | dlp | C++ Forum | 1 | 25-May-2006 13:22 |
| Bloodshed Dev C++ Project Options | JdS | C++ Forum | 6 | 11-Nov-2005 18:23 |
| Using .dat files | SpudNuts | C++ Forum | 3 | 13-Mar-2005 20:28 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The