Hi i am wondering if its possible to do the following,say i have 2 integer pointers containing numbers,and i want to add them together to a third integer pointer,is this possible?
StaticX
0
Junior Poster in Training
Recommended Answers
Jump to Post>is this possible?
Is this a troll? Or a bad joke? Of course it's possible, as are most things that noobs use the "is it possible?" question to ask about.
Jump to PostThanks for the replies,is this because *p1 is derefrenced here so contents can be added?
Yep, just think about it like this, if ptr is a pointer-to-int, then *ptr,
is the value that it points to , so if it points to an address, which
has the value 4, then …
All 7 Replies
Narue
5,707
Bad Cop
Team Colleague
mrnutty
761
Senior Poster
JasonHippy
739
Practically a Master Poster
StaticX
0
Junior Poster in Training
mrnutty
761
Senior Poster
sadanand23
0
Newbie Poster
necrolin
94
Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.