- Joined
- Jun 17, 2010
- Messages
- 1
- Reaction score
- 0
// This program is displaying an error "L value required" How to correct this?
#include"iostream.h"
#include"conio.h"
class love
{
char name[10];
char paris;
public:
void getdata(void);
void display(void);
};
void love::getdata(void)
{
cout<<"Enter name :";
cin>>name;
while(name=paris)
cout<<"I love you";
}
void love::display(void)
{
cout<<name;
}
void main()
{
love L;
L.getdata();
L.display();
getch();
}
#include"iostream.h"
#include"conio.h"
class love
{
char name[10];
char paris;
public:
void getdata(void);
void display(void);
};
void love::getdata(void)
{
cout<<"Enter name :";
cin>>name;
while(name=paris)
cout<<"I love you";
}
void love::display(void)
{
cout<<name;
}
void main()
{
love L;
L.getdata();
L.display();
getch();
}