help on my code
Quote:Original post by jykQuote:Original post by XrystalThe arguments are references, not pointers, so the . syntax is correct.
with the function parameters being pointers (&name) you may find that using name->one and name->two will work better.
@The OP: It looks like the problem may be access privilages; try making the member variables of 'enemy' public and see if that works.
Once you get it working, the next step is probably to revise the design to reflect OOP principals such as encapsulation (assuming that's what you're going for).
Thanks for that comment. To be honest I get the two items mixed up. I almost always use &varname when calling a function that has *varname in its declaration. I think I misread the OPs code in that light and apologise for the misunderstanding.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement