Error: expected declaration specifiers or '...' before 'inputInfoLivro'

Asked

Viewed 420 times

-1

void listarcaixas(int opcaixa, inputInfoLivro, inputInfoRevista){
int quantidadeobra = inputInfoLivro(L) + inputInfoRevista(R);
int i;

for(i=0; i<quantidadeobra; i++){
    
    if(rvist.caixa == opcaixa && lvro.caixa == opcaixa){
        printf("\n Titulo: %s\n", rvist.titulo);
        printf("\n Autor: %s\n", rvist.autor);
        printf("\n Editora: %s\n", rvist.editora);
        printf("\n Edicao: %s\n", rvist.edicao);
        printf("\n ISBN: %s\n", rvist.isbn);
        printf("\n Quantidade: %s\n", rvist.quantidade);
        printf("\n Caixa: %d", rvist.caixa);
        printf("\n ******************************************** \n \n");
        
        printf("\n Titulo: %s\n", lvro.titulo);
        printf("\n Autor: %s\n", lvro.autor);
        printf("\n Editora: %s\n", lvro.editora);
        printf("\n Edicao: %s\n", lvro.edicao);
        printf("\n ISBN: %s\n", lvro.isbn);
        printf("\n Quantidade: %s\n", lvro.quantidade);
        printf("\n Caixa: %d", lvro.caixa);
        printf("\n ******************************************** \n \n");
            
    }
}
}

am receiving errors -> [Error] expected declaration specifiers or '...' before 'inputInfoLivro'

                        [Error] expected declaration specifiers or '...' before 'inputInfoRevistas'

option is a global variable that the user inserts.

the two input are functions that returned an integer value.

I didn’t put the whole code.

  • Incidentally inputInfoLivro and inputInfoRevista are function names you want to pass as parameter? If it is not a valid syntax. Maybe using pointer to function can help you.

  • I haven’t learned to use pointers yet...

  • That’s what I want, to pass as a parameter

  • I don’t know a direct solution, the way you tried, without the use of pointers.

1 answer

0

The type of variable you receive in the function is missing

void listboxes (int opcaixa, 'here' inputInfoLivro, 'e_here' inputInfoRevista)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.