Pergunta

I keep getting the following errors about typename posizione and int constant POSIZIONENULLA. Strangely I have used type posizione throught my code, but get the errors only in the the function.

Coda.h:156: error: `template<class T> class Coda' used without template parameters
Coda.h: In function `typename Coda<T>::posizione copiaNodo(typename Coda<T>::posizione)':
Coda.h:158: error: `POSIZIONENULLA' undeclared (first use this function)
Coda.h:158: error: (Each undeclared identifier is reported only once for each function it appears in.)
Coda.h:161: error: `posizione' undeclared (first use this function)
Coda.h:161: error: expected `;' before "tempPosizione"
Coda.h:162: error: `tempPosizione' undeclared (first use this function)
Coda.h:164: error: `temPosizione' undeclared (first use this function)
Coda.h: At global scope:
Coda.h:169: error: `template<class T> class Coda' used without template parameters
Coda.h: In function `void eliminaNodo(typename Coda<T>::posizione)':
Coda.h:171: error: `POSIZIONENULLA' undeclared (first use this function)
Coda.h:173: error: `posizione' undeclared (first use this function)
Coda.h:173: error: expected `;' before "tempPosizione"
Coda.h:175: error: `tempPosizione' undeclared (first use this function) make: *** [Coda.o] Error 1

I am using dev-c++ 4.9.9.2 with g++

I have uploaded the whole source code @ http://ge.tt/9I0pXcS/v/0?c for you to compile. for compilation you can use the make file in folder "Coda" or launch the following commands in the compiler folder.

g++ -g -c Coda.h -o Coda.o ar crf Coda.a Coda.o

I really help you can me. Thanks you very much in advance for your time. Thanks.

Foi útil?

Solução

Coda.h:156: error: `template<class T> class Coda' used without template parameters

This tells you that you have put Coda instead of Coda<something>.

Coda.h:158: error: `POSIZIONENULLA' undeclared (first use this function)

You haven't declare POSIZIONENULLA.

Coda.h:161: error: `posizione' undeclared (first use this function)

Same.

Coda.h:161: error: expected `;' before "tempPosizione"

You forgot a semicolon ; in line 161

Coda.h:162: error: `tempPosizione' undeclared (first use this function) and Coda.h:164: error: `temPosizione' undeclared (first use this function)

Same as above.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top