简体   繁体   English

错误:'>' 标记前的预期主表达式

[英]Error: expected primary-expression before '>' token

so I was writing my code and everything was working fine.所以我正在编写我的代码并且一切正常。 Then I had a compiler issue and had to create my project all over again and rewrite some lines of code.然后我遇到了编译器问题,不得不重新创建我的项目并重写一些代码行。

Now I'm getting this error where before it did not exist, and I am getting it in multiple lines .. Can't figure out why.现在我在它之前不存在的地方收到这个错误,我在多行中得到它.. 不知道为什么。

(It is all happening when throwing the exceptions) (这都是在抛出异常时发生的)

Example::例子::

if (!encontrouInicio) throw NoInexistente<N>(inicio);

and

 if ((*it)->info == inf) throw NoRepetido<N>(inf);

Thanks in advance (y)提前致谢 (y)

If N is type variable of your class you should in the call give it a real type or something that is present there like:如果N是你的类的类型变量,你应该在调用中给它一个真正的类型或存在于那里的东西,比如:

int magicNumber = 5;
throw NoInexistente<int>(magicNumber);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM