0

I don’t know how to solve this problem.

#include<iostream> #include<cstdlib> #include "平台作业2. using namespace std; class CComplex { private: double x; double y; public: CComplex(double R,double I){ x=R; y=I; } double GetRealNum() const{ return x; } double GetImagNum() const{ return y; } }; int main() { double Real, Imag; cin >> Real >> Imag; const CComplex num1(Real, Imag); cout << "(" << num1.GetRealNum() << ',' << num1.GetImagNum() << ")"<< endl; return 0; }

30th Apr 2020, 4:08 PM
Elmando霸薇尔
Elmando霸薇尔 - avatar
4 Antworten
+ 2
If you remove the #include "平台作业2. it works perfect https://code.sololearn.com/c6lt9CfzVW0n/?ref=app
30th Apr 2020, 4:15 PM
Alexander Thiem
Alexander Thiem - avatar
+ 1
You are welcome
30th Apr 2020, 4:23 PM
Alexander Thiem
Alexander Thiem - avatar
0
It can’t run
30th Apr 2020, 4:08 PM
Elmando霸薇尔
Elmando霸薇尔 - avatar
0
I didn't notice this file, it existed by itself the second time I opened it, I don't know why. TThank you!
30th Apr 2020, 4:20 PM
Elmando霸薇尔
Elmando霸薇尔 - avatar