each letter is node in linked-list, unknown size of word retrieved from user : program is supposed to take word from user (of unknown lenght) then create linked-list, each node should contain one character. It works with pre-declarated word but i am having a problem with 
"Stack around the variable 'str' was corrupted." if i try to simply 

cin>>word;

Any help would be welcome.

    #include <iostream>
    #include <iomanip>
    #include <stdio.h>

    using namespace std;

    struct slistEl
    {
	slistEl * next;
	char data;
    };

    unsigned l_size(slistEl * head)
    {
	unsigned  c = 0;
	slistEl * p = head;

	if (p)
		do
		{
		c++;
		p = p->next;
		} while (p != head);
	  return c;
      }


      void l_printl(slistEl * head)
      {
	 slistEl * p;

	cout << setw(3) << l_size(head) << " [";
	p = head;
	if (p)
		do
		{
		p = p->next;
		cout << " " << p->data;
		
		} while (p != head);
	cout << " ]\n\n";
     }

    void l_push(slistEl * & head, char v)
    {
	slistEl * p = new slistEl;

	p->data = v;
	if (head)
	{
		p->next = head->next;
		head->next = p;
	}
	else p->next = p;
	head = p;
    }

      void l_pop(slistEl * & head)
    {
	if (head)
	{
		slistEl * p = head->next;
		head->next = p->next;
		if (p->next == p) head = NULL;
		delete p;
	  }
     }

    int main()
    {
	slistEl * head = NULL;

	char str[] = "abcdefgh"; // pre-declarated word

	//cin >> str;  //program should take word from user

	for (int i = 0; str[i] != '\0'; i++)
	{
		l_push(head, str[i]);
		l_printl(head);
	}
	
	system("PAUSE");
	return 0;
    }
 
