Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006


How to read or write the picture and sound file in Unix

Sorry :
I want to read or write the picture and sound file in Unix, for example the '. Retrieval 'file.
This has nothing to be done :
.....
Int fd1=open ( "/load/picture1.jpg", O_RDONLY);
.....
  
But fd1 is -1, why?
Thanks!!

How to read or write the picture and sound file in Unix

Hi.
I suggest checking the return value of open ().
If it isn 't 0, the output of the error message.
Try call the function [void perror (const char buried)] and it will tell you the reason why.

Like this :

If (fd1 "0)
Perror ( "open");

How to read or write the picture and sound file in Unix

Check documents and the location of authority, and if there is no problem, it seems that the landlord said, the most perror printed with wrong information.

How to read or write the picture and sound file in Unix

Thanks!
Now is ok, i find i make a mistake, the file name is not picture1.jpg! picuture1.jpg
Thanks!

How to read or write the picture and sound file in Unix

SeeLand and mike_chen :
Thanks very much!you are very simple and make a fool mistake! friendly!i



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com