for loop for simple linked list c++
<p>I'm trying to do a loop for this part:</p>

<pre><code>    insert_front(&amp;list,name[0]);
    insert_front(&amp;list,name[1]);                 
    insert_front(&amp;list,name[2]);
</code></pre>

<p>but, i can't figure out which should be used as a limiter, which should stop the loop for going and how it will change the name[] perimeters. </p>

<p>Here's the whole code:</p>

<pre><code>#include "list.h"
#include "string"
using namespace std;
int main(){
    cout&lt;&lt;"What is your name \n";
    string name;
    getline(cin,name);

    Node *list;

    list = new_list();                          
    insert_front(&amp;list,name[0]);
    insert_front(&amp;list,name[1]);                  
    insert_front(&amp;list,name[2]);
    }                          
    print_list(list);                                      
    delete_list(&amp;list);
        print_list(list);
        return 0;

}
</code></pre>
