Академический Документы
Профессиональный Документы
Культура Документы
h"
#include <iostream>
#pragma warning (disable:4996)
using namespace std;
struct Word
{
char *s;// ��� ������� strtoc �� string
Word *next;
};
void AddToList(char str[30], Word **head, Word *prew);
void Print(Word *word);
int main()
{
}
void AddToList(char str[30],Word **curr,Word *prew)
{
int counter = 0;
/*if (*curr == NULL)
{
*curr = new Word;
(*curr)->s = str;
(*curr)->next = NULL;
counter++;
}*/
//else {
int bird = 0;
Word *last = new Word;
last = prew;
while (last->next != NULL)
{
last = last->next;
bird++;
}
cout << "| " << bird << " |" << endl;
last->next = new Word;
last = last->next;
last->s = str;
last->next = NULL;
*curr = last;
counter += 2;
//}
cout << counter;
}
void Print(Word *word)
{
int i = 7;
Word *print = word;
while (print)
{
cout << print->s;
print = print->next;
}
}