0

I have a function

queue< pair<int,int> > * factorize(int n) {
...}

It shows this compile error.

generatePrimes.cpp:20: error: expected constructor, destructor, or type conversion before '<' token
generatePrimes.cpp:20: error: expected `,' or `;' before '<' token

What's wrong?

1 Answer 1

4

Either you don't include necessary header files (queue and utility), or don't have using namespace std or both.

To overcome the first problem include the headers. To overcome the second one either add using or provide fully qualified names (std::queue and std::pair).

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

1 Comment

Thanx, I didnt write namespace.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.