Click here to Skip to main content
15,915,873 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how can read from binary file? Pin
Le@rner10-Jan-08 22:36
Le@rner10-Jan-08 22:36 
QuestionRe: how can read from binary file? [modified] Pin
Nishad S10-Jan-08 22:34
Nishad S10-Jan-08 22:34 
GeneralRe: how can read from binary file? Pin
Le@rner10-Jan-08 22:47
Le@rner10-Jan-08 22:47 
GeneralRe: how can read from binary file? Pin
CPallini10-Jan-08 22:54
mveCPallini10-Jan-08 22:54 
GeneralRe: how can read from binary file? Pin
Nishad S10-Jan-08 22:58
Nishad S10-Jan-08 22:58 
AnswerRe: how can read from binary file? Pin
Hamid_RT10-Jan-08 21:08
Hamid_RT10-Jan-08 21:08 
GeneralRe: how can read from binary file? Pin
Le@rner10-Jan-08 22:19
Le@rner10-Jan-08 22:19 
GeneralRe: how can read from binary file? Pin
David Crow11-Jan-08 3:03
David Crow11-Jan-08 3:03 
vijaylaxmi wrote:
rfile.read(buffer,sizeof(buffer));read from buffer
wfile.write(buffer,sizeof(buffer));


Maybe you should start with a less ambitious project until you learn about return values and such.

Have you considered something like:

std::istream i = rfile.read(buffer, sizeof(buffer));
wfile.write(buffer, i.gcount());


"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne


GeneralRe: how can read from binary file? Pin
Le@rner11-Jan-08 23:14
Le@rner11-Jan-08 23:14 
General[Message Deleted] Pin
Le@rner10-Jan-08 20:45
Le@rner10-Jan-08 20:45 
GeneralRe: how can read binary file? Pin
Hamid_RT10-Jan-08 21:11
Hamid_RT10-Jan-08 21:11 
QuestionCan we save multiple documents in SDI application Pin
Atul2310-Jan-08 20:43
Atul2310-Jan-08 20:43 
QuestionCheck EOF Pin
nitin310-Jan-08 20:19
nitin310-Jan-08 20:19 
GeneralRe: Check EOF Pin
Hamid_RT10-Jan-08 21:33
Hamid_RT10-Jan-08 21:33 
JokeRe: Check EOF Pin
CPallini10-Jan-08 21:37
mveCPallini10-Jan-08 21:37 
GeneralRe: Check EOF Pin
Maxwell Chen10-Jan-08 21:39
Maxwell Chen10-Jan-08 21:39 
GeneralRe: Check EOF Pin
Hamid_RT10-Jan-08 23:14
Hamid_RT10-Jan-08 23:14 
GeneralRe: Check EOF Pin
CPallini10-Jan-08 21:36
mveCPallini10-Jan-08 21:36 
GeneralRe: Check EOF Pin
Nishad S10-Jan-08 22:54
Nishad S10-Jan-08 22:54 
GeneralRe: Check EOF Pin
David Crow11-Jan-08 3:18
David Crow11-Jan-08 3:18 
GeneralRe: Check EOF Pin
zengkun10011-Jan-08 19:18
zengkun10011-Jan-08 19:18 
QuestionHow can let myself's picture cover other control? Pin
hanlei000000000910-Jan-08 19:46
hanlei000000000910-Jan-08 19:46 
AnswerRe: How can let myself's picture cover other control? Pin
Nishad S10-Jan-08 20:30
Nishad S10-Jan-08 20:30 
AnswerRe: How can let myself's picture cover other control? Pin
David Crow11-Jan-08 3:21
David Crow11-Jan-08 3:21 
AnswerRe: How can let myself's picture cover other control? Pin
Mark Salsbery11-Jan-08 8:34
Mark Salsbery11-Jan-08 8:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.