Need help with this in C++ Express  
Author Message
Keenah





PostPosted: Visual C++ Express Edition, Need help with this in C++ Express Top

I keep getting this error and need to run this for a final project this week. Pls help

"Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded."

Project is below.

#include <iostream>

#include<string>

using namespace std;

class Employee{

private: string name;

double hworked, hrate;

public: Employee(){

name="";

hworked=0;

hrate=0;}

void inputemployee(){

cout<<" Please Input Name of Employee ";

cin>>name;

cout<<" Please Input Name of Hours Worked ";

cin>>hworked;

cout<<" Please Input Name of Hourly Rate ";

cin>>hrate;}

string getname(){

return name;

}

double regpay(){

if (hworked > 40)

return 40 * hrate;

else return hrate * hworked;}

double ovtpay(){

if (hworked>40)

return (hworked>40)*hrate*1.5;

else return 0;}

double gpay(){

return regpay()+ovtpay();}

double tamt(){

double trate=0.3;

return gpay()*trate;}

double netpay(){

return gpay()-tamt();}

void display(){

cout<<"Name of Employee is: "<<name<<endl;

cout<<"Hours Worked are : "<<hworked<<endl;

cout<<"Hourly Rate is : "<<hrate<<endl;

cout<<"Over Time Pay is : "<<ovtpay()<<endl;

cout<<"Regular Pay is : "<<regpay()<<endl;

cout<<"Tax Amount is : "<<tamt()<<endl;

cout<<"Net Pay is : "<<netpay()<<endl;}

};

void main(){

Employee emp;

emp.getname();

emp.gpay();

emp.netpay();

emp.tamt();

emp.inputemployee();

emp.display();

}




Visual Studio Express Editions7  
 
 
orcmid





PostPosted: Visual C++ Express Edition, Need help with this in C++ Express Top

I keep getting this error and need to run this for a final project this week. Pls help

"Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded."

Well then, today is your lucky day.

That is no error. The compilation worked and the program is loading successfully.

It is an informative message only, and it is a simple statement of fact. The standard distribution of the Windows libraries do not include debugging versions of the internal system libraries with symbols. There's no problem. You won't be debugging those.

If this is the only message you are getting, you should simply debug your program. If you are not getting the results you require, find and fix the problem.

For future references: errors show up in an error window or a warning window. The output window material that is not reflected in such a window is simply informative.

- Dennis

PS: Be consoled. You are not the first to stumble on this one, and you won't be the last.



 
 
Keenah





PostPosted: Visual C++ Express Edition, Need help with this in C++ Express Top

Thank you for your response. I'm really new to this program. How do I debug I barely know if my code is correct.

 
 
orcmid





PostPosted: Visual C++ Express Edition, Need help with this in C++ Express Top

I'm really new to this program. How do I debug I barely know if my code is correct.

What you want to be able to do is demonstrate that your program is working correctly.

For the sample you give, that means providing data into your program, showing the derived results as outputs, and checking the results for given input.

As you find that you have discrepancies in these areas, you can use additional input and output statements to isolate the problem and discover the source of any deviation from what is expected.

This does mean you must know what is expected and how to tell when it has been produced.

The first step for you is to run your program in a console session (use Ctrl+F5) and inspect what you get.

- Dennis