![]() |
|
#1
|
|||
|
|||
Streaming problemsHi, im having problems with my code in the respect that nothing happens lol. I want to stream bytes from 'usbimage2.txt' into the buffer until the buffer is full. I then want to stream the buffer into 'new.txt'. I thought that this syntax was correct but nothing happens, can anyone see what im doing wrong?
thanks Code:
|
|||
|
#2
|
|||
|
|||
Re: Streaming problemsQuote:
Are you really lolling? Oh, well, here are a few observations: 1. That code uses myFile before it is declared. What code are you really using? If by "nothing happens," you mean that it doesn't compile, then maybe you should show us exactly what you are using and tell us exactly what happens when you try to do whatever it is that you are trying to do. If it does compile but something unwanted happens when you try to execute (or "nothing" happens), then post the program, not just a couple of lines that won't compile. Be sure to tell us enough about what it is that you don't understand so that we might be able to help you. General programming recommendations: 2. You should always test to see that streams are opened successfully before using. (Yes, always.) 3. You should always test the state of a stream after attempting to read. (Yes, always.) Same for writing. 4. You can make a loop using the read and write statements that you showed and make it do what you want it to. but... 5. How about showing us the complete code so that we won't have to guess at the many, many (many) things that you could be doing wrong? How the heck could you think anyone could help you unless you show us how you are trying to do the deed? Regards, Dave |
Recent GIDBlog
Problems with the Navy (Chiefs) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Recent problems with antivirus programmes | steven_symantec | Member Announcements, Advertisements & Offers | 3 | 14-Feb-2008 22:22 |
| Problems while burning CD's | netnut | Computer Software Forum - Windows | 16 | 18-Jan-2008 00:45 |
| Challenge problems plz help plz | crazyABOUTyou | C++ Forum | 3 | 24-Apr-2007 11:32 |
| out of memory problems | pixienick | MS Visual C++ / MFC Forum | 1 | 25-Apr-2006 13:37 |
| Chaintech Geforce 5600 FX problems | bartster74 | Computer Hardware Forum | 8 | 04-May-2004 14:16 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The