| | |
Passing an integer by adress
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
Hello.. Im trying to pass an integer to a function by adress because I want to change the value of the integer in the function. But it will not.. please help.
Here is my function call:
Here is my function:
LIST is integer. I typedef it.
This list is a cursor-based implementation.
Here is my function call:
c Syntax (Toggle Plain Text)
insert_sorted(&VH, &L, n);
Here is my function:
c Syntax (Toggle Plain Text)
void insert_sorted(VirtualHeap *VH, LIST *A, char element) { int *ctr, index; index = MyMalloc(&(*VH)); VH->H[index].elem = element; for(ctr = A; *ctr != -1 && VH->H[*ctr].elem < VH->H[index].elem; ctr = &VH->H[*ctr].next); VH->H[index].next = *ctr; *ctr = index; }
This list is a cursor-based implementation.
Last edited by Whilliam; Jul 9th, 2009 at 11:03 am.
![]() |
Similar Threads
- ParamArray Example (VB.NET)
- Question about Random Number Generators (C++)
- error in coding (C++)
- Pascal : Cant see why program wont run, exits with error. (Pascal and Delphi)
- Some Data Structure Problem (C++)
- please display my mistake in this prg.errors r written in red (C)
- what is the difference between (ptarray[]) AND &(ptarray[i]) in below example (C++)
- Functions and Array help (C++)
- help with Greatest common divisor (C++)
Other Threads in the C Forum
- Previous Thread: linked list (another problem)
- Next Thread: can anyone help me with this C program?
Views: 266 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for C
#include ansi array arrays asterisks binarysearch calculate centimeter changingto char command convert copyimagefile cprogramme creafecopyofanytypeoffileinc database directory dynamic fflush file fork forloop framework functions getlasterror givemetehcodez grade graphics gtkgcurlcompiling hacking hardware histogram homework inches include incrementoperators input iso kernel km lazy linked linkedlist linux linuxsegmentationfault list lists locate logical_drives looping loopinsideloop. lowest match matrix microsoft motherboard mysql number opendocumentformat opensource owf pattern pdf performance pointer posix problem probleminc process program programming radix recursion recv research reversing scanf scripting segmentationfault sequential shape socket socketprograming spoonfeeding standard string strings structures student systemcall testing threads turboc unix user variable voidmain() wab windows.h windowsapi






)), having the same problem can see how to fix their problem. 