本文介绍了编译SymbolicC ++ - 运算符,是不明确的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在VC ++ 2010 Express中编译SymbolicC ++库(在发行版中有特殊的VS项目),但它在系统标题中给出了很多错误,与运算符。例如:

I'm trying to compile the SymbolicC++ library in VC++ 2010 Express (there is special VS project in the distribution), but it gives a lot of errors in system headers, related to operator,. For example:

对于系统标题中的此代码:

For this code in a system header:

if (_Str[0] < _E0 || _E0 + 9 < _Str[0])
    _Str2 += '-', ++_Off;

为什么?如何编译?

推荐答案

显然,SymbolicC ++重载了

Apparently, SymbolicC++ has overloaded operator, in such a manner that a downstream include has been affected.

您应该重新排序您的包含,以便SymbolicC ++的包含最后一个:

You should reorder your includes such that SymbolicC++'s include comes last:

#include <iostream>
#include <vector>

// don't want to monkey with our other headers
#include "symbolicc++.h"

这不是说< xlocmon> 头中的代码是不可疑的, 逗号运算符的使用要求麻烦。

This isn't to say the code in the <xlocmon> header isn't suspect, that sort of usage of the comma operator is asking for trouble.

这篇关于编译SymbolicC ++ - 运算符,是不明确的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 01:26