Jump to content

ler ficheiro de estruturas usando o read em unix


Recommended Posts

Caros quero ler um ficheiro de estruturas, usando o read, tenho de usar as system calls de unix

fiz assim mas da erro, como faço?

void lelistacontas (banco * b)
   int le,total=0;
   conta p;// variavel do tipo conta
   printf(" A ler as contas do banco do ficheiro \n");

// vou abrir o ficheiro com permisoes de escrita se nao existir sera criado


  printf(" nao foi possivel ler o ficheiro\n");

     write(b->listacontas[total++],conta,nread);// nao sei se e assim

muito obrigada

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.