|
||||||
| C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Ok so i'm writing a program to sort an array using heap sort. I have my main function that gets the information on what the array is, then using a function to sort it. The function is defined as: void maxheapify(int A[], int i, int len)
So I've figured out that the array doesn't really get modified when I pass the array into the function. But I can't just do A=maxheapify(A, i, len) either because in maxheapify A is an int*... And if I turn the A in main to an int* then I get a whole crap load of errors.... So anyone have any suggestions? I can post my whole code if need be. |
| Sponsored Links |
|
|
|
|||||
|
An array name IS a pointer. You have to receive the array as a pointer in the function.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help regarding the sorting of arrays with flags! | Yuriy M | C and C++ | 3 | 10-12-2007 10:30 PM |
| Usage of array structures to increment letter instances of text | Yuriy M | C and C++ | 2 | 09-13-2007 10:49 AM |
| fread into array position | kenna | C and C++ | 0 | 08-17-2007 08:03 AM |
| Best program for SQL database manipulation | Rhadamanthys | Database & Database Programming | 3 | 07-02-2007 02:32 PM |
| Python 2D array question | annannienann | Python | 3 | 04-23-2007 04:36 PM |
Goal: 100,000 Posts
Complete: 68%