此代码的C++中杂散'342'编译器错误
A stray '342' compiler error in C++ for this code
我在程序中遇到过这种类型的' '342' ';第一次出现错误。
下面是我的代码#include <bits/stdc++.h>
using namespace std;
#define sc(n) scanf("%d",&n)
#define tc1 cin>>t;while(t--)
#define forf(i, a, b) for(i =(a); i <(b); ++i)
int main()
{
long long int t, x1, x2, x3, y1, y2, y3, points, temp;
float area;
tc1
{
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
temp = x1*y2 + x2*y3 + x3*y1 −x1*y3 − x3*y2 − x2*y1;
area = 0.5f * abs(temp);
points = area + 1 - (3/2);
cout << points << "n";
}
return 0;
}
下面是我的编译错误:
solution.cc:18:9: error: stray '342' in program
temp=x1*y2 +x2*y3 + x3*y1 −x1*y3 − x3*y2 − x2*y1;
^
solution.cc:18:9: error: stray '210' in program
solution.cc:18:9: error: stray '222' in program
solution.cc:18:9: error: stray '342' in program
solution.cc:18:9: error: stray '210' in program
solution.cc:18:9: error: stray '222' in program
solution.cc:18:9: error: stray '342' in program
solution.cc:18:9: error: stray '210' in program
solution.cc:18:9: error: stray '222' in program
solution.cc: In function 'int main()':
solution.cc:18:38: error: expected ';' before 'x1'
temp=x1*y2 +x2*y3 + x3*y1 −x1*y3 − x3*y2 − x2*y1;
^
这个错误是什么意思?
我无法通过之前问过的问题来理解这个错误的确切含义。
看起来你的公式中有错误的字符
temp=x1*y2 +x2*y3 + x3*y1 −x1*y3 − x3*y2 − x2*y1;
和
不一样temp=x1*y2 +x2*y3 + x3*y1 -x1*y3 - x3*y2 - x2*y1;
可以看到(-
)是不同的
相关文章:
- MSVC多行宏编译器错误
- 静态数据成员的问题-修复链接错误会导致编译器错误
- C++,我收到一个无法理解的编译器错误
- 如何解决gcc编译器优化导致的centos双编译器设置中的分段错误
- C++错误C2600:无法定义编译器生成的特殊成员函数(必须首先在类中声明)
- 我收到同义重复编译器错误。我应该如何修复"类型"X"的参数与类型"X"的参数不兼容?
- 重载方法的方式会在使用临时调用时生成编译器错误
- 尝试使用继承和模板实现CRTP.Visual Studio正在生成编译器错误
- 有没有办法让编译器在我放置字符串而不是 nlohmann::json 对象时抛出错误?
- 致命错误 C1001 :vs2017 15.8.4 的内部错误(编译器文件"msc1.cpp",第
- C++2440错误-编译器认为字符串是常量字符
- Clang 错误 – 编译器错误或缺少一些细节?
- 视觉C++ 2017 错误?编译器优化表达式
- 配置:错误:C++编译器无法创建可执行文件
- PHP PDO_ODBC配置:错误:C 编译器无法创建可执行文件
- 致命错误 C1001:内部编译器错误(编译器文件"MSC1.cpp",第 1794 行)
- 错误:编译器限制达到简单hello world程序的堆限制
- c++链接错误:编译器找不到函数的定义
- 生成 CImg 时出现致命错误(编译器限制)
- 抛出对齐类型时出现 Clang 运行时错误.编译器错误