Jump to content
Fórum Script Brasil
  • 0

Entrada Formatada Usando O Scanset

Guest Jean Carlos


Guest Jean Carlos

Olá sou novo por aki.

to tendo um problema com Scanset

assim, estou fazendo uma leitura de um arquivo :

Ele é mais o menos assim:


# Created by IrfanView

1600 1200


ae eu uso

char tipo[];
    char comentario[];
    int comprimento;
    int largura;
    char tam_pix[];

    fscanf(fp, "%[^\n]\n",tipo);
    fscanf(fp, "%[^\n]",comentario);
    fscanf(fp,"%d %d\n",&comprimento,&largura);
    fscanf(fp, "%[^\n]\n",tam_pix);

    printf("%d x %d\n",comprimento, largura);

ae aparece:



1600 x 1200


alguém sabe porque? porque segundo o livro ta certo

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...