- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
7 Posted Topics
Hi friends, I am new to c++, just find this example from the book, but when i try to run in my visual studio,its gives problem. there is no error in the codes, it compile well, and in main screen ask the user to input the selection that they want, … | |
Re: #include #include using namespace std; class employee { string getname; string getsalary; int salary; public: void getdata(void); void setdata(void); employee() { salary =10%; last = " "; first = " "; } }; void employee::getdata(void) { cout<<"\n a first name:"<>first; cout<<"last name?:"; cin>>last; cout<<"monthly salary?:"; cin>>salary; } int main() { … | |
what about this question.........what is a default comstructor? how are an object's data members initialized if a class has only an implicitly defied default constructor? explain the purpose of data member. << moderator edit: split thread (was a reply to [thread=15829]this[/thread]) >> | |
Re: can anybdy help on this question......write a program that uses a for statement to calculate and print the average of several integers. assume the last value read is the sentinel 9999. a typical input sequence might be. 10.....8......11.....7.....9.......9999 | |
Re: #include #include using namespace std; class employee { string getname; string getsalary; int salary; public: void getdata(void); void setdata(void); employee() { salary =10%; last = " "; first = " "; } }; void employee::getdata(void) { cout<<"\n a first name:"<>first; cout<<"last name?:"; cin>>last; cout<<"monthly salary?:"; cin>>salary; } int main() { … | |
Re: anybody can correct me........ this my question..... (employee class) create a class called employee that include three pieces of information as data members - a first name (type string), a last name (type string) and a monthly salary (type int).your class should have a constructor that initializes the three data … | |
Re: this the question........ (employee class) create a class called employee that include three pieces of iformation as data members - a first name(type string), a last name(type string) and a monthly salary(type int). your class should have a constructor that initializes the three data members. provide a set and a … |
The End.