C++ new Operator Calling new for a string.
#include <iostream> using namespace std; int main()//from w w w.jav a2 s . co m { string *Password = new string; *Password = "this is a test."; cout << *Password << endl; return 0; }