回复 9楼 林月儿
我试了试,在未触及两个溢出int的值的时候把if放入for循环确实达到了我想要的目的。目前还无法很灵活的应用上面那位的几个函数。所以我想是用double实现,又出现了:C:\Users\Administrator\Desktop\遇到的问题\Cpp1.cpp(30) : error C2108: subscript is not of integral type
C:\Users\Administrator\Desktop\遇到的问题\Cpp1.cpp(30) : error C2108: subscript is not of integral type
C:\Users\Administrator\Desktop\遇到的问题\Cpp1.cpp(30) : error C2297: '*' : illegal, right operand has type 'double *'
C:\Users\Administrator\Desktop\遇到的问题\Cpp1.cpp(30) : error C2108: subscript is not of integral type
C:\Users\Administrator\Desktop\遇到的问题\Cpp1.cpp(30) : error C2108: subscript is not of integral type
C:\Users\Administrator\Desktop\遇到的问题\Cpp1.cpp(30) : error C2296: '*' : illegal, left operand has type 'double *'
C:\Users\Administrator\Desktop\遇到的问题\Cpp1.cpp(30) : error C2297: '*' : illegal, right operand has type 'double *'
C:\Users\Administrator\Desktop\遇到的问题\Cpp1.cpp(32) : error C2108: subscript is not of integral type
如下的错误,我搜索了一下类似错误都是pow()函数不能返回double值,可我没用pow()怎么出现相关错误,如果您有时间能指教以下用double怎么写么?