What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
class Base
{
string s;
public:
Base() { s="Sample text";}
Base(string s) { this?>s=s; }
void Print() { cout << s; }
};
int main()
{
Base *o = new Base();
o?>Print();
}
Currently there are no comments in this discussion, be the first to comment!