# include < iostream.h >
# include < string.h >
class string
{
private: char *str;
public: 
string (char *s) 
{ 
int length = strlen(s);
Char *str = new char[length + 1];
strcpy(str, s);
}
~string()
{        delete str;	}
void display()
{	cout << str; }
};
void main() {
string S1 = "Build Bright University";
cout << endl <<"s1 = ";
s1.display();
}
Click here to go back.

Our aim is to provide information to the knowledge seekers. 


comments powered by Disqus




Footer1