| | |
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
Views: 588 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for C
api arguments array arrays binary binarysearch c++ char character code codes coke command conversion convert copyimagefile cpu database decimal directory dude dynamic ebook ebooks error exec factorial fgets file fork function functions getlasterror givemetehcodez grade graphics hardware homework i/o input insert int integer lazy libcurl line linked linkedlist linux list lists locate logical_drives loop loops malloc matrix memory messagebox motherboard mysql no-effort opensource output path pause pointer pointers problem process program programming questions read recursion recursive recv reverse scanf single socketprograming socketprogramming spoonfeeding sql static string strings strtok structures student suggestions system systemcall turbo turbo-c turboc unix user variable windows





