|
-
August 11th, 2005, 11:14 AM
#16
-
August 11th, 2005, 11:36 AM
#17
Re: can anyone help me
 Originally Posted by Mugilan
I dont know
Didn't your instructor cover strings in class? What implementation did he/she describe to you?
-
August 11th, 2005, 01:27 PM
#18
Re: can anyone help me
Get a book for C++ beginners.
It sounds like you never went to any of the classes. Nobody is going to do your homework for you. How are you suppose to learn if don't try to do it.
-
August 12th, 2005, 05:41 AM
#19
Re: can anyone help me
what is a default constructor ? how are an object's data members initialized if a class has only implicitly defined default constructor? explain the purpose of data member...........
anyone can tell me.....where i can get answers for this....
-
August 12th, 2005, 05:54 AM
#20
Re: can anyone help me
 Originally Posted by Mugilan
anyone can tell me.....where i can get answers for this....
You normally learn that in the course. But it seems that you were playing truant. In that case I would take Jim's advice and get a book.
Please don't forget to rate users who helped you!
-
August 12th, 2005, 06:00 AM
#21
Re: can anyone help me
i am not playing truant.........i am new to this...... i am taking diploma in IT, the class is just started about 2 weeks ago....
-
August 13th, 2005, 02:08 AM
#22
Re: can anyone help me
i write a program.......
#include<iostream>
using namespace std;
class employee
{
string first;
string last;
int salary;
public:
void getdata(void);
void setdata(void);
employee()
{
salary = 0;
last;
first;
}
};
int main()
{
void employee::getdata(void)
{
cout<<"a first name:";
cout<<"a last name:";
cout<<"monthly salary:";
}
void employee::setdata(void)
{
cout<<"first name";<< <<"\n";
cout<<"last name";<< <<"\n";
cout<<"monthly salary";<< <<"\n";
}
return 0;
}
but still got 2 error.......can anybody help me
.cpp(24): error C2601: 'employee::getdata' : local function definitions are illegal
.cpp(31): error C2601: 'employee::setdata' : local function definitions are illegal
-
August 13th, 2005, 03:35 AM
#23
Re: can anyone help me
 Originally Posted by Mugilan
void employee::getdata(void)
{
cout<<"a first name:";
cout<<"a last name:";
cout<<"monthly salary:";
}
void employee::setdata(void)
{
cout<<"first name";<< <<"\n";
cout<<"last name";<< <<"\n";
cout<<"monthly salary";<< <<"\n";
}
You have to put this (above) in the end. Out of the main() function.
Please don't forget to rate users who helped you!
-
August 13th, 2005, 07:49 AM
#24
Re: can anyone help me
Google C++ tutorials.
Read them slowly and carefully.
Take your time.
Understand what is data delcaration, functions, arrays and pointers.
Then get on to OOPS concepts and classes.
All the Best
-
August 13th, 2005, 07:58 AM
#25
Re: can anyone help me
#include<iostream>
#include<string>
using namespace std;
class employee
{
string first;
string last;
int salary;
public:
void getdata(void);
void setdata(void);
employee()
{
salary = 0;
last = " ";
first = " ";
}
};
void employee::getdata(void)
{
cout<<"\n a first name:"<<first;
cout<<"\n a last name:"<<last;
cout<<"\n monthly salary:"<<salary;
}
void employee::setdata(void)
{
cout<<"first name?:";
cin>>first;
cout<<"last name?:";
cin>>last;
cout<<"monthly salary?:";
cin>>salary;
}
int main()
{
employee E;
E.setdata();
cout<<"\n yearly salary:\n";
E.getdata();
return 0;
}
using this program how to do this......create two employee objects and display each object's yearly salary.the give each employee a 10 percent raise and display each employee's yearly salary again.
-
August 16th, 2005, 11:10 PM
#26
Re: can anyone help me
can anybody help me on this question.............................................
wrte a program that prits the power of the integer 2, namely 2, 4, 8 , 16, 32, 64, etc. your while loop should not terminate (i.e..you should create an infinite loop). to do this simply use the keyword true as the expression for while statement. what happens when you ru this program?
can anybody please help me on this
-
August 17th, 2005, 12:51 AM
#27
Re: can anyone help me
wt u want exactly????
U want program ?
OR
wt happens if we run that program?
-
August 17th, 2005, 02:07 AM
#28
Re: can anyone help me
The whole idea of taking a diploma in IT is FOR YOU TO LEARN. Your instructor will have already covered what you need for this homework or will at least have given references to books. Pay attention, read the references and other supplied material and if you still don't understand tell him. We've already done our homework and can better spend our time helping others who show signs of helping themselves. You're showing absolutely no signs that you've made any effort at all. Why should we help?
On a different point not related to this. I express the same views regarding the Indian sub-continent's request to do their IT outsourcing work for them.
This is a forum for professionals and would-be profesionals. Not a "do my homework for me" and "write my outsourcing project for me" forum.
I apologise in advance if I upset some members but this forum is cluttered with such requests and I'm getting a little tired of it (as I suspect are some other members).
Requests such as
"I need to write an new language compiler by next week, I have teach yourself c++ in 21 days, can someone give me example code?" will be ignored.
-
August 17th, 2005, 04:01 AM
#29
Re: can anyone help me
Mugilan..what is ur age??
do u go to school or college??
we all will be very happy to see u urself doing ur home work..
this site is to help someone who has a query..!!!
Take it positively

ProElite
-
August 17th, 2005, 04:23 AM
#30
Re: can anyone help me
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|