[ create a new paste ] login | about

Link: http://codepad.org/jCLS7qHA    [ raw code | output | fork ]

C, pasted on Jan 7:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Thêm NODE p sau NODE q
void InserAfterQ(LIST& L, NODE* p, NODE* q)
{
	if(q == NULL)
		return;
	if(q == L.pTail)  // Nếu q đúng là NODE cuối thì gọi hàm AddTail có sẵn
	{
		AddTail(L, p);
	}
	else
	{
		p->pNext = q->pNext;
		q->pNext = p;
	}
}


Output:
1
Line 2: error: expected ')' before '&' token


Create a new paste based on this one


Comments: