C++ std::getline result string won't let me concatenate another string to it
<p>I am attempting to read data from a .txt file which contains nothing but a list of names. I want to do the following for each name:</p>

<pre><code>1) read a name and store it in a string variable.
2) Add quotes to the name ("name")
3) make a map entry using each name (map["name"]= x)
</code></pre>

<p>I am using the std::getline function to read each line and I'm trying to add the quotes simply by using ( string name="\""+line+"\"" ).
The problem is that every time I add something to the end of the line string, nothing is added!</p>

<p>This is my code:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;map&gt;
#include &lt;fstream&gt;
#include &lt;stdlib.h&gt;

using namespace std;

int main(){
    ifstream reader("input.txt");
    string line;
    string name;
    map&lt;string,int&gt; arr;
    int np=5;
    for(int i=0;i&lt;np;i++){
        getline(reader,line);
        name="\"" +line +"\"";
        cout&lt;&lt; name &lt;&lt; endl;
    }
    return 0;
}
</code></pre>

<p>This is my input txt file:</p>

<pre><code>dave
laura
owen
vick
amr
</code></pre>

<p>this is the output I'm currently getting:</p>

<pre><code>"dave
"laura
"owen
"vick
"amr"
</code></pre>

<p>Thank you very much!</p>