| | |
difficult to understand
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
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 adobe ansi api array arrays asterisks binarysearch calculate centimeter changingto char convert copyimagefile cprogramme creafecopyofanytypeoffileinc csyntax database directory dynamic fflush file fork forloop framework getlasterror givemetehcodez grade graphics gtkgcurlcompiling hacking hardware highest histogram inches include incrementoperators input iso kernel km linked linkedlist linux linuxsegmentationfault list lists locate logical_drives looping loopinsideloop. lowest match matrix microsoft motherboard multi mysql number opendocumentformat opensource owf pattern pdf performance pointer posix probleminc process program programming radix recursion recv repetition research reversing scanf scripting segmentationfault sequential shape socket socketprograming stack standard string strings structures systemcall testing threads turboc unix user variable voidmain() wab windows.h windowsapi






