When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
9 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
;compile
int x = 5;
int y = 5;
printf("%d\n", x++);
printf("%d\n", x);
printf("%d\n", ++y);
printf("%d\n", y);
5
6
6
6
The value of x++ is what x was before
The value of ++x is what x is after
Both still increment
Also ya, passing structs by value makes a copy. If you want to modify the original, you need to pass a pointer to it
Best way I think of it: in Java, every object (non-primative) is passed by a pointer (sort of)
@pseudo kettle Has your question been resolved? If so, run !solved :)
Thank you and let us know if you have any more questions!
This thread is now set to auto-hide after an hour of inactivity