Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
CS50 Stack Exchange is a question and answer site for students of Harvard University's CS50. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
5 years, 10 months ago
How to declare an array of structure pointers? I need to create a collection of linked list. Is it same as declaring ordinary arrays? If
May 10, 2017 at 12:31
It is the same as everywhere else. If your struct is for example
struct node, an array of pointers would be for example
struct node *myarray[ARR_LENGTH] (assuming
ARR_LENGTH to be a constant meaning the array length)
If you typedef'd your struct, you could obviously use that type instead.
May 10, 2017 at 12:52
20.8k 2 2 gold badges 11 11 silver badges 22 22 bronze badges
log in to answer this question.
Not the answer you're looking for? Browse other questions tagged
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only