Skip to main content

Thread: When are pointers (in C) necessary?


hey guys,
can tell me when necessary use pointers in c , not normal variables? can give me example?
cheers!

say have big struct want pass function modify. can have function take in copy of struct, modify copy, return copy in place of original. or, can pass in pointer struct, modify struct in place, , done it. 2 (potentially slow) copy operations, or zero. choice.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk When are pointers (in C) necessary?


Ubuntu

Comments