我正在阅读 C++ 源代码,将中缀转换为后缀我正在使用 turbo C++
#include <stdio.h>
typedef struct node
{
float data;
struct node *next;
} stack;
void StackInitiate(stack **head)
{
//error
if(*head=(stack *)malloc(sizeof(stack))==NULL)
exit(1);
(*head)->next=NULL;
}
// 我得到 .. 无法将 'int' 转换为 'node *' ...
谁能告诉我为什么会这样。以及如何解决它。
完整的源代码在这里