Q:

c style string on c++ question

so you can do c style string on c++ using char * ...
my question is, can you pretty much do anything you can do on normal string with such declaration..
so suppose you have
char * c;

can you do:
c = "etcetc";
c = c + "dddddd";

etc? 
and moreover is it pretty much interchangable with string?
so 
char * c = "etcetc";
string s; 

s = c; 

would that be valid? 

A:

A C-style string is essentially a NULL terminated character array while std::string in C++ is an well-designed object-oriented string class/object. In most case, they're NOT interchangeable and it depends on what operation you perform. You can always call std::string::c_str() to get the internal C-style string.
char * c

// OK because this makes c point to the starting address of "etcetc",
c = "etcetc";

// Compile-time error! You cannot add two pointers anyway because it's meaningless
c = c + "dddddd";

// OK, because string has constructor "string ( const char * s )"
string s1 = c;

string s2;
// OK, because string has "string& operator= ( const char* s )"
s2 = c;

One thing worth mentioning:
// "etcetc" is a constant string here and you cannot modify it via pointer c
char * c = "etcetc";

// You can change string contents in two cases
char c[] = "etcetc";
string str = "etcetc";

