Is there any way to assign a quoted string to a pointer as following, without having it cast to const char*?
char** p;
*p=new char[100];
*p="quoted_string\n";
The problem with the above is that p is now a const string and I can't delete blocks from it:
delete p[n]; //gives an error--- block_is_valid...
I know about string literals such as L"string" but I couldn't find anything to solve my problem, though.
CLARIFICATION: I clearly stated that I'm looking for a method that is at the level of simplicity present in the provided example. I know that I can iterate through the string and copy it, but that's not what I'm looking for.
And for those confused about the placement of delete, I use it for something like this:
while(*p!=char_01) //this is not an example to be taken literally
{delete p; p++;}