error: invalid operands of types ‘double’ and ‘double’ to binary ‘operator^’
来源:互联网 发布:淘宝上怎么搜索gta5 编辑:程序博客网 时间:2024/05/17 08:07
今天在编译 g++ test.cpp -o test 时候,系统老提示
test.cpp: In function ‘int main()’:
test.cpp:122: error: invalid operands of types ‘double’ and ‘double’ to binary ‘operator^’test.cpp:123: error: invalid operands of types ‘double’ and ‘double’ to binary ‘operator^’
test.cpp:139: error: invalid operands of types ‘double’ and ‘double’ to binary ‘operator^’
test.cpp:140: error: invalid operands of types ‘double’ and ‘double’ to binary ‘operator^’
这句话有问题,C++没有强大到A^2=A*A
dfaOutputXY[uiXX][uiYY].x=-(double)(sqrt(dfRadius^2-(ADOutputY[uiYY])^2))*((double)cos(dfTMP1));
改正后:
dfaOutputXY[uiXX][uiYY].x = -sqrt(dfRadius*dfRadius-ADOutputY[uiYY]*ADOutputY[uiYY])*cos(dfTMP1);
编译通过~~~
0 0
- error: invalid operands of types ‘double’ and ‘double’ to binary ‘operator^’
- "invalid operands of types ‘float Point3d::*’ and ‘float Point3d::*’ to binary ‘operator<’"
- ERROR:invalid operands to binary -
- 6410_io_drv.c: error: invalid operands to binary << (have 'char *' and 'int') 错误处理
- Swift Compiler Error Binary oprator '+' cannot be applied to operands of type 'UInt16' and 'UInt8'
- Binary operator ‘|’ cannot be applied to two ‘UIViewAutoresizing’ operands
- Incompatible conditional operand types int and Double
- gcc编译出现 invalid operands to binary -的解决方法
- Binary Tree To Double LinkedList
- string to int to double and int double to string
- Swift中推送通知设置:Binary operator '|' cannot be applied to two UIUserNotificationType operands 错误解决
- 【iOS】swift-Binary operator '|' cannot be applied to two UIViewAutoresizing operands
- Avoid float and double types if exact answers are required.
- SICP Combine operands of different types
- How to eliminate the compile error "conversion from 'double ' to 'float ', possible loss of data"
- the error: no operator << matches these operands
- iPhone实例学习之iphone sdk2.0 miss和invalid operands to binary问题
- Invalid double崩溃分析
- YARN(Hadoop)学习笔记(5)
- iOS应用性能调优的25个建议和技巧
- 金色十月线上编程比赛第二题:解密 csdn
- C++中C/C++格式化输出
- WeakReference与SoftReference
- error: invalid operands of types ‘double’ and ‘double’ to binary ‘operator^’
- BZOJ 2818: Gcd
- android个人学习笔记-触摸事件机制
- 台间谍策反大陆学生个人资料曝光 国人应该如何防间谍
- centos7通过yum安装mysql,并授权远程连接
- 查找一个字符串里,出现次数最多的字符,时间复杂度O(n)
- Java.util中的线程池和Spring框架对这个类的扩展
- Linux下的修改文件名
- Struts2文件上传--上传图片文件