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; }
4 Antworten
+ 2
If you remove the
#include "平台作业2.
it works perfect
https://code.sololearn.com/c6lt9CfzVW0n/?ref=app
+ 1
You are welcome
0
It can’t run
0
I didn't notice this file, it existed by itself the second time I opened it, I don't know why. TThank you!