linked list
tidak ada data
#include<iostream>
#include<conio.h>
using namespace std;
void main(){
struct node
{
int data; //will store information
node*next; //the reference to the next node
};
node*head=NULL; //create head
node*newNode; //create a temporary node
int nilai=10;
//add@front
newNode=(node*)malloc(sizeof(node));//allocate space for node
newNode->data=nilai;
newNode->next=head;
head=newNode;
_getch();
}
Selasa, 07 Juni 2011
Langganan:
Posting Komentar (Atom)
Comments :
0 komentar to “linked list”
Posting Komentar