Error: expected primary expression before X

Can you explain what a header error usually means?

I get it sometimes, and I always manage to fix it by accident, but I still don't know what that means.

Here is an example of my current error:

Lca<RankVec, VertexVec> lca(graphList[0], dset, ss&);

error: expected primary expression before ')' token

+5
source share
4 answers

& . 0x3 & 0x5 == 0x1. . , , , ss . , ss & - , ( " " ). ). , , AND.

+2

- , IIRC undefined (, - , ). , .

- ( , ? , GCC?) -

edit: , , , "&". - , .

( ) , ++ , , , , , , , .

+3

., 5.1 ,

: , , ::.

2.6 ,

There are five types of tokens: identifiers, keywords, literals, 16) and other delimiters

Now I think the error is quite descriptive.

Hope this helps.

+2
source

It's hard to guess with the information in the OP at the moment, but let me try.

Assuming everything else is in place, since the expression in OP is a function call, try changing the way you pass the last argument. If you want to pass it as a pointer, you must use both before the name and not after.

Lca<RankVec, VertexVec> lca(graphList[0], dset, &ss); 
0
source

All Articles