you are a tax calculator in company, and you should calculate the tax based on staff’s salary as follows:
-the salary is less than 600, the tax is0.
-the salary is greater than 600 and less than 800, the tax is 10% of the salary.
-the salary is greater than 800 and less than 1000, the tax is 13% of the salary.
-the salary is greater than 1000 and less than 1500, the tax is 18% of the salary.
-the salary is greater than 1500, tax is 20% of the salary.
Write a program in C++ to ask the user to enter the salary then calculate the tax using:
If-Only structure, If-Else structure, Switch-Case structure.
cout<< "Tax software developed by https://iq.direct" << endl;
cout<< "Enter Salary:";
double s = 0, t = 0;
cin >> s;
cout<<"you entered: " << s << endl;
if (s < 600)
t = 0;
if (s >= 600 && s < 800 )
t = s * 0.1;
if (s >= 800 && s < 1000 )
t = s * 0.13;
cout<< "The tax will be :" << t;
I could not test your "code" because there is a lot of problems with:
cannot convert from 'DWORD (__cdecl *)(DWORD_PTR,LPBYTE,LONG,LONG *)' to 'EDITSTREAMCALLBACK'
and so on.
Could you post a code (sample project) that would reproduce your problem?
You have to simplify your project code until it will reproduce the problem. Just make a very simple project with your RichEdit without any TCP/IP and other IPCs.
Test it. If you won't find the reason of the trouble while debugging this test project then post it to me or/and to the community.
For the class parameter the documentation says a redefined name (not sure what that means) the reason I am asking I am using a control for which I have a specific WNDCLASS which I registered however the CDialog::Create fails with that control statement in the resource definition