Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
C
i have a struct node and i put it in an array.how to make pointer to it insid array?
i have a struct node and i put it in an array.how to make pointer to it insid array?
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
mohamed mostafa
New Member
Join Date:
Dec 2010
Posts:
1
#1
i have a struct node and i put it in an array.how to make pointer to it insid array?
Dec 21 '10, 09:32 PM
i want to make a pointer to a node inside an array...how can i make it??
donbock
Recognized Expert
Top Contributor
Join Date:
Mar 2008
Posts:
2427
#2
Dec 21 '10, 09:59 PM
So you have a node structure, and an array of these structures, and you want to set a pointer variable to point at the ith node in the array.
You can do this in exactly the same way you would if it was an array of longs:
Code:
int i; long *p, array[100]; ... p = &array[i];
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment