Developer forums (C::B DEVELOPMENT STRICTLY!) > Contributions to C::B

Just started >.>

<< < (2/2)

BlueHazzard:
And make sure to not have installed two compilers!!!

rxbarey:
can some review this
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>

struct node
{
   int data;
   struct node* next;
   struct node* prev;
   
};

struct node *start=NULL;

struct node* create()

{
   struct node *n;

   n=(struct node*)malloc(sizeof(struct node));
   return(n);   
}

void insbeg()
{
   struct node *temp;
   
   printf("\n ENTER  THE DATA \n");
   scanf("%d",&temp->data);
   temp->prev=NULL;
   temp->next=NULL;
   
   if(start==NULL)
   
   
   start=temp;

else
{
   temp->next=start;
   start->prev=temp;
   start=temp;
}
}

      
int main()
{
   
    while(1)
{
insbeg();
}
getch();
}

stahta01:
@rxbarey: Please review and then follow the rules for this website!

http://forums.codeblocks.org/index.php/topic,9996.0.html

Tim S.

Navigation

[0] Message Index

[*] Previous page

Go to full version