DEBUGGING C++ Contest - 25th August

3
   
   

This is a program in c++ which is implemented using some of the concepts of oops.Anyhow, it is not predicting the proper output.Hence, check whether there are some bugs and if you find any bugs clear it and repost the code with explanation.

  There are some bugs in the basic concepts of oops.Identify it and clear it.

Attachment your code here.

.txt   debug.txt (Size: 606 bytes / Downloads: 165)
Fear is a reaction,but courage is a destination
#include<iostream.h>
#include<conio.h>
class a
{
private:
char name;
public:
void sample();
void welcome();
};
void a:Confusedample()
{
cout<<"THIS IS THE PROGRAM TO IMPLEMENT OOPS CONCEPTs";
}
void a::welcome()
{
cout<<"WELCOME TO OOPS";
}
class b
{
private:
char name1;
public:
void getdata()
{
cout<<"ENTER YOUR NAME";
cin>> name1;
}
void putdata()
{
cout<<"NAME="<<name1;
}
};
class c
{
private:
char name2;
name2=strcpy(name2,name1);
public:
void show data()
{
cout<<"NAME="<<name2;
}
};

In dis prgm , while acesing the member function outside the class syntax error.

Next, strcpy (name2,name1) is d crt one. bcs variable is initialised as name 2 .But in dis prgm it showed wrong syntax

Last one is class terminated incorrectly
I hve edited the program above
No main function in the Program and some basic errors in this programs are corrected The Debugged C++ program is here :
.txt   Debugged C++ Program.txt (Size: 766 bytes / Downloads: 122)
Got the Materials You Searched for?If no then Post a Request here : Request Zone 

    DEBUGGING C++ Contest - 25th August