小编use*_*535的帖子

scanf() is not waiting for user input

I am working on making tree using doubly linked list in c. I use recursive call in that function , but somehow it do not works. my code is :

struct node
{
    int data;
    struct node *right;
    struct node *left;
};

struct node* getNode()
{
    struct node *temp;
    temp= (struct node *)malloc(sizeof(struct node));
    temp->right=NULL;
    temp->left=NULL;
    return temp; 
}
Run Code Online (Sandbox Code Playgroud)

here in the below function I am getting the problem.

struct node* maketree()
{
    struct node *t;
    t=getNode(); 
    int value;
    char …
Run Code Online (Sandbox Code Playgroud)

c scanf

-1
推荐指数
1
解决办法
2万
查看次数

标签 统计

c ×1

scanf ×1