Posts by Lucas Pessone • 36 points
2 posts
-
1
votes2
answers75
viewsA: How to print the two vector values in the pointer struct?
I understand that you want to pass the struct by reference, avoid redundancies and optimize the code, but the notation *(ptr + pos) is equivalent to ptr[pos] in C... that is, you are trying to…
-
1
votes2
answers118
viewsA: manipulation of some struct
If I understand correctly, you want the life field to have a default value of 100 when the struct is instantiated. If you are coding in C it is unfortunately not possible, as you cannot assign…