struct node
{
int data;
struct node *next;
} *start=NULL;
void create()
{
char ch;
do
{
struct node *new_node,*current;
new_node = (struct node *)malloc(sizeof(struct node));
printf("\nEnter the data : ");
scanf("%d",&new_node->data);
new_node->next = NULL;
if(start == NULL)
{
start = new_node;
current = new_node;
}
else
{
current->next = new_node;
current = new_node;
}
printf("nDo you want to creat another : ");
ch = getch();
} while(ch!='n');
}
Run Code Online (Sandbox Code Playgroud)
这是包含以下内容的代码部分 getch()
当我尝试在联机编译器中运行此代码时,出现以下错误:未定义对getch
collect2的引用:错误:1d返回1退出状态
如何解决这个问题?...请帮助
c ×1