| | |
Array with pointer
![]() |
•
•
Join Date: Aug 2008
Posts: 206
Reputation:
Solved Threads: 31
The simpler way (less error prone) is to use a typedef helper.
or, if you wish code that is terse but easier to get wrong (typos very easy), use this;
to declare an array named YourArrayAlternative.
Whichever way you choose to do it, I'll leave it to you to work out how to initialise array elements.
C Syntax (Toggle Plain Text)
typedef float ((*YourFunction)(int, int); YourFunction YourArray[3];
C Syntax (Toggle Plain Text)
float (*YourArrayAlternative[3])(int, int);
Whichever way you choose to do it, I'll leave it to you to work out how to initialise array elements.
![]() |
Similar Threads
- c language problm, how to pass pointer to a function (C)
- get length of a dynamic array (C++)
- delete array and assigns array to pointer (C++)
- subscript require array or pointer (C++)
- C++: compile error "subscripted value is neither array nor pointer" (C++)
- returning an array? (C++)
Other Threads in the C Forum
- Previous Thread: Reverse Digits
- Next Thread: char *argv[] help
| Thread Tools | Search this Thread |
* ansi api array arrays bash binarysearch calculate centimeter changingto char character convert copyanyfile copypdffile createcopyoffile createprocess() csyntax directory dynamic execv fflush file floatingpointvalidation fork forloop frequency function getlasterror getlogicaldrivestrin givemetehcodez grade graphics gtkgcurlcompiling gtkwinlinux hardware highest histogram homework i/o ide inches intmain() iso km license linked linkedlist linux linuxsegmentationfault list logical_drives looping loopinsideloop. lowest match matrix microsoft motherboard mqqueue mysql oddnumber odf open opendocumentformat openwebfoundation pdf pointer posix power program programming pyramidusingturboccodes read recursion recv recvblocked repetition reversing scanf scheduling segmentationfault send shape single socketprogramming stack standard strchr string suggestions test unix urboc user variable whythiscodecausesegmentationfault win32api windows.h windowsapi





