| | |
difficult to understand
![]() |
I have just learnt C so I always meet some problem
Could you tell me the meaning of this code?
I don't understand "nodeptr &Head"
thank you
Could you tell me the meaning of this code?
C Syntax (Toggle Plain Text)
void InsertListOrder(Nodeptr &Head,Nodeptr G) { Nodeptr P, Q; P = Head; while (P != NULL) { if (strcmp(P->key.tu,G->key.tu)>0) break; Q = P; P = Q->next; } if (P == Head) { G->next = Head; Head = G; } else { G->next = Q->next; Q->next = G; } }
thank you
That is a reference to a nodeptr object in another function. The object is passed by reference so that InsertListOrder() can change its value. Any changes to Head in funciton InsertListOrder will be made to the object in the function that calls InsertListOrder().
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- Xfx Motherboard Problem (Motherboards, CPUs and RAM)
- What's the HARDEST program you've written? (Computer Science)
- Looking for Good Stats Program (Search Engine Optimization)
- Game of life (C++)
- Tell us about yourself! (Community Introductions)
- Volume Controls have dissapeared!!! (Windows NT / 2000 / XP)
- Networking Laptop with main computer through modem (Networking Hardware Configuration)
- Access Web Database? (Database Design)
- Need help with DirectX code (C)
Other Threads in the C Forum
- Previous Thread: Lo and behold. God just went open source.
- Next Thread: Behaviour of Binary Search Program
| Thread Tools | Search this Thread |
#include * ansi array arrays asterisks bash binarysearch calculate centimeter changingto char character convert copyanyfile copyimagefile creafecopyofanytypeoffileinc createprocess() database dynamic execv fgets file floatingpointvalidation fork framework function getlogicaldrivestrin givemetehcodez grade gtkwinlinux histogram ide inches include infiniteloop initialization input interest intmain() iso keyboard km license linked linkedlist linux list looping lowest matrix meter microsoft number oddnumber open opendocumentformat openwebfoundation owf pdf pointer pointers posix power probleminc process program programming pyramidusingturboccodes radix read recursion recv recvblocked research reversing scheduling segmentationfault send sequential single socket socketprogramming standard strchr string suggestions systemcall test testautomation testing threads turboc unix urboc user variable whythiscodecausesegmentationfault win32api windowsapi






