![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| far pointer | useless79 | High Level Programming | 1 | 11-08-2007 02:13 AM |
| A Pointer to non-Virtual Address, and All of my Hard drive | xcoder66 | High Level Programming | 9 | 12-19-2005 02:22 PM |
| pointer | sarwan | High Level Programming | 1 | 11-15-2005 03:41 AM |
| How to Achive IP address through MAC(Ethernet) address | krishnacins | IP Networking | 3 | 08-29-2005 05:45 PM |
| network address and broadcast address? | pnxi | UNIX for Dummies Questions & Answers | 7 | 11-10-2003 08:29 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#15
|
|||
|
|||
|
Quote:
i'm not sure what im doing anymore |
| Forum Sponsor | ||
|
|
|
#16
|
||||
|
||||
|
Try to dump your program and post here what values have firstFree and heap (use gdb or so) in dumpHeap()
|
|
#17
|
|||
|
|||
|
Quote:
|
|
#18
|
||||
|
||||
|
Compile your programm with gcc -g (with debug info) and then run it with gdb (gdb programm). Look at man gdb or http://www.gnu.org/software/gdb/documentation/ for more info
|
|
#19
|
|||
|
|||
|
char heap[ 134 ];
char *firstFree = heap; This is your first two lines of code heap - is a character array firstFree - is a character pointer which can hold an address of a variable heap - holds the address of the first location of the array heap[134] so the second line must be firstFree=heap; Regards kingskar |
|
#20
|
||||
|
||||
|
Quote:
char *firstFree = heap; equals to char *firstFree; firstFree = heap; It's just a combination of declaration of pointer to the charachter and it's definition. |
||||
| Google The UNIX and Linux Forums |