Question: Hello i'm from Indonesia. and i'm verry beginner on C++ programming. I have some problem when i learn about string on C++ . First i declared array of char and i want to initialize a value separately in different command. After i initialize the value my compiler say "Invalid Argument".

```
    #include <iostream>

    using namespace std;

    int main() {

    char Name[5];

    Name = "Luke";

    cout<<"Character 0 :"<<Name[0]<<endl;
    cout<<"Character 1 :"<<Name[1]<<endl;
    cout<<"Character 2 :"<<Name[2]<<endl;
    cout<<"Character 3 :"<<Name[3]<<endl;
    cout<<"Character 4 :"<<Name[4]<<endl;

    return 0;

    }

```

sorry if my english is bad :(

Answer: 
> 
> A character array(including a C string) can not have a new value assigned to it after it is declared.
> 
> 
> The C++compiler interprets these assignment statements as attempts to change the address stored in the array name, not as attempts to change the contents of the array.
> 
> 
> 

However you can use
-------------------

```
char name[] = "Luke";

```
A `char[]` can't be assigned with a string with the `=` operator, except for on its initialization. That's why `char Name[5]; Name = "Luke";` is invalid while `char Name[5] = "Luke";` is.

Assigning strings to `char[]` can be done with `strcpy() / memcpy()`-like functions.

So you have two ways of action (assuming you want to work with `char[]`):

1. `char Name[5] = "Luke";`
2. `char Name[5]; strcpy(Name, "Luke"); /* don't forget to #include <string.h>*/`