4

I have a public function:

void determineAction(QStringList tempL); // in header file void CompArch::determineAction(QStringList tempL) { } //in cpp file 

I get the error:

CompArch.cpp:127:6: error: ‘tempL’ has incomplete type /usr/include/qt4/QtCore/qstring.h:77:7: error: forward declaration of ‘struct QStringList’ 

any ideas why this might be.

2 Answers 2

11

add #include <QStringList> to the top of your .cpp file. Incomplete type means that your class (QStringList) has already been named before, using foward declaration, but the content of it has not been declared.

Sign up to request clarification or add additional context in comments.

Comments

1

Incomplete type means that the compiler has seen QStringList as class, but did not see the body of the QStringList class header. It looks like you must include a header that does contain the class header body for QStringList.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.