I am trying to make a vector extended header. One of the functions sets a vector to the console input (cin). It uses the following code:

```
vector<char> cveccin(){
    string cinval;
    cin>>cinval;
    vector<char> creader;
    for (int i=0; i<cinval.size(); i++) {
        creader[i]=cinval[i];
    }
    return creader;
}

```

I use this function in a test, and it gives me EXC\_BAD\_ACCESS. What's going wrong here?