| | |
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: 267 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for C
adobe ansi api array arrays asterisks binarysearch calculate centimeter char command convert copyimagefile copypdffile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax directory dynamic executable fflush file fork forloop frequency getlasterror givemetehcodez graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators infiniteloop kernel km lazy linked linkedlist linux linuxsegmentationfault list lists locate logical_drives match matrix microsoft motherboard multi mysql number open opendocumentformat opensource owf pattern pdf performance pointer pointers posix problem probleminc program programming radix recursion recv repetition research scanf scheduling scripting segmentationfault send sequential shape socketprograming spoonfeeding stack standard string strings structures student systemcall testautomation turboc unix user variable voidmain() wab win32 windows.h






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