#include <iostream>
using namespace std;

int main() {

char str[20] = "hi";
char *pStr = str;
cout << pStr << endl;  // prints hi

char str2[20];
str2[0]='b';
str2[1]='y';
str2[2]='e';
str2[3]='\0';

// what's wrong with: int len =  str2.length();

pStr=str2;
cout << str2 << endl;
if (pStr==str2) cout << "equal";

string cppstring;

cppstring="hello";  // assigning a c-string to a c++ string
cppstring=str2;     // same

// cannot assign to a c-string:    str2=cppstring;
// CAN compare a c-string and a c++ string
if(cppstring=="hello")
if (str2==cppstring)    // either side of the operator is a c++ string


return 0;
}
