Оценка:
Опубликованно: 02.04.2004.
Язык: Английский
Уровень: Средняя школа
Литературный список: Нет
Ссылки: Не использованы
  • Образец документа 'Stacks in C++ ', 1.
  • Образец документа 'Stacks in C++ ', 2.
  • Образец документа 'Stacks in C++ ', 3.
  • Образец документа 'Stacks in C++ ', 4.
  • Образец документа 'Stacks in C++ ', 5.
  • Образец документа 'Stacks in C++ ', 6.
Фрагмент работы

//variables
int value;
//asking for value
cout << "nnEnter value to push : ";
cin >> value;
//new node decleration
stack_node *new_node;
// Allocate memory for the new node.
new_node = new stack_node;
/*I have seen some processors specially AMD chipsets
sometimes gives error for basic stack dynamic programming,
also sometime we get system error due to the status of the
RAM, By looking at this posibility i include this error here */
if(new_node == NULL)
{
// If memory allocation problem, set error
// status and proceed to exit the function.

Коментарий автора
Atlants