Welcome to Dream.In.Code
Become a C++ Expert!

Join 137,395 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,126 people online right now. Registration is fast and FREE... Join Now!




struct and node

 
Reply to this topicStart new topic

struct and node

brainy_creature
30 Oct, 2006 - 03:34 AM
Post #1

D.I.C Head
**

Joined: 7 Aug, 2006
Posts: 174



Thanked: 1 times
My Contributions
what does the header file <alloc.h> do??


please explain the next few lines

struct node
{
int info;
char name;
struct node*link;
};
typedef struct node*NODE;
Node insert(int item,char pname,NODE first,int pos)
{
NODE prev,cur,temp;

int count=1;
temp=(NODE)malloc(sizeof(struct node));
temp->info=item;
temp->name=Null;
temp->link=NULL;
if(pos==1)
{
.....................
User is offlineProfile CardPM
+Quote Post

Xing
RE: Struct And Node
30 Oct, 2006 - 03:42 AM
Post #2

D.I.C Addict
Group Icon

Joined: 22 Jul, 2006
Posts: 723



Thanked: 2 times
Dream Kudos: 1575
My Contributions
QUOTE(brainy_creature @ 30 Oct, 2006 - 05:04 PM) *

what does the header file <alloc.h> do??

It's a non-standard header supported by few compilers which provides memory allocation routines for you to use.
Standard headers
---------------------
In C -> use <stdlib.h>
---------
In C++-> use <cstdlib>
---------
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/5/08 02:47AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month