#include <iostream>
#include <cstring>
using std::cout;
using std::endl;
class Test {
char s[30];
public:
Test(char *_s) {
strcpy(s, _s);
}
operator char *() {
return s;
}
};
int main()
{
Test o("C++ Programming");
char *p = o;
cout << p << endl;
char str[20];
strcpy(str, o);
cout << str << endl;
return (0);
}
/*
run:
C++ Programming
C++ Programming
*/