// Illustrates that C-like strings cannot be assigned. // The similar assignment is possible on C++ strings. // Does not compile. #include void g(){ char s1[6] = "Knold", s2[6] = "Tot "; s1 = s2; // Compiler error: Invalid array assignment s2[1] = 'u'; // OK. std::cout << s1 << " og " << s2 << std::endl; } int main(){ g(); }