Click here to Skip to main content
15,909,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: About Multicast. Help Pin
Mark Salsbery30-Mar-07 7:07
Mark Salsbery30-Mar-07 7:07 
AnswerRe: About Multicast. Help Pin
kcynic30-Mar-07 13:41
kcynic30-Mar-07 13:41 
GeneralRe: About Multicast. Help Pin
Mark Salsbery31-Mar-07 6:37
Mark Salsbery31-Mar-07 6:37 
QuestionSTARTTLS Command Pin
neha.agarwal2730-Mar-07 1:49
neha.agarwal2730-Mar-07 1:49 
QuestionUsing WebService in C++ Pin
Tyler4530-Mar-07 1:41
Tyler4530-Mar-07 1:41 
AnswerRe: Using WebService in C++ Pin
Programm3r30-Mar-07 1:55
Programm3r30-Mar-07 1:55 
AnswerRe: Using WebService in C++ Pin
Tyler4530-Mar-07 2:31
Tyler4530-Mar-07 2:31 
Questionlinked list problem Pin
neha.agarwal2730-Mar-07 1:33
neha.agarwal2730-Mar-07 1:33 
Hi all,

I m trying to make a linked list. in which three items are present...
when i display the item only last item is displayed and it runs infinetly....
i Suppose all the three items are written at one memory location..
the code is as follows..

struct node
{
	char str[23];
	node *nxt;
};

node *start_ptr ;
void insert();
void display();

int main(int argc, char* argv[])
{
	insert();
	//display();
	return 0;
}

void insert()
{
	node *temp = new node;


	start_ptr = temp;

	for(int i = 0;i<3;i++)
	{
		cout<<"\n enter the name ";
		cin>>temp->str;

		temp->nxt = temp;
		temp = temp->nxt;
	}
}

void display()
{
	node *temp2 = start_ptr;

	while(temp2->nxt != NULL)
	{
		cout<<"\n Name = "<<temp2->str;
		temp2 = temp2->nxt;
	}
}


can anybosy help me in this

thanks in advance
AnswerRe: linked list problem Pin
Cedric Moonen30-Mar-07 1:44
Cedric Moonen30-Mar-07 1:44 
AnswerRe: linked list problem [modified] Pin
CPallini30-Mar-07 1:59
mveCPallini30-Mar-07 1:59 
GeneralRe: linked list problem Pin
neha.agarwal2730-Mar-07 2:13
neha.agarwal2730-Mar-07 2:13 
GeneralRe: linked list problem Pin
Cedric Moonen30-Mar-07 2:19
Cedric Moonen30-Mar-07 2:19 
GeneralRe: linked list problem Pin
neha.agarwal2730-Mar-07 2:27
neha.agarwal2730-Mar-07 2:27 
QuestionRe: linked list problem Pin
Maximilien30-Mar-07 3:21
Maximilien30-Mar-07 3:21 
AnswerRe: linked list problem Pin
Christian Graus30-Mar-07 3:31
protectorChristian Graus30-Mar-07 3:31 
AnswerRe: linked list problem Pin
ThatsAlok1-Apr-07 21:00
ThatsAlok1-Apr-07 21:00 
QuestionDisabling Controls Pin
gunner_uk200030-Mar-07 1:10
gunner_uk200030-Mar-07 1:10 
AnswerRe: Disabling Controls Pin
Naveen30-Mar-07 1:18
Naveen30-Mar-07 1:18 
GeneralRe: Disabling Controls Pin
gunner_uk200030-Mar-07 1:22
gunner_uk200030-Mar-07 1:22 
GeneralRe: Disabling Controls [modified] Pin
Naveen30-Mar-07 1:31
Naveen30-Mar-07 1:31 
AnswerRe: Disabling Controls Pin
gunner_uk200030-Mar-07 1:34
gunner_uk200030-Mar-07 1:34 
GeneralRe: Disabling Controls [modified] Pin
Naveen30-Mar-07 1:48
Naveen30-Mar-07 1:48 
AnswerRe: Disabling Controls Pin
prasad_som30-Mar-07 1:48
prasad_som30-Mar-07 1:48 
GeneralRe: Disabling Controls Pin
gunner_uk200030-Mar-07 1:52
gunner_uk200030-Mar-07 1:52 
Questionatl8.0 backward compatibility issue Pin
Shiva Prasad30-Mar-07 1:09
Shiva Prasad30-Mar-07 1:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.