thanks, I'm looking up how to use malloc() etc. at the moment. My (current) task is to design a library of functions that a main() written by someone else could call, knowing the function, but not...
Type: Posts; User: emorrp1
thanks, I'm looking up how to use malloc() etc. at the moment. My (current) task is to design a library of functions that a main() written by someone else could call, knowing the function, but not...
because I now have it all abstracted enough that I no longer need to know about the structure of the led class, but I do need to send the port locations of the LEDs as arguments to the function that...
thanks for looking at it, tabstop. I read something somewhere about casting the pointer up to the parent, because it's the first definition in the child, but I'm not used to pointers yet (coming...
Ok, so I know inheritance isn't actually implemented in C, but I've used one of the very common workarounds, and I'd like to know how to pass the "inherited" structure to a function (which is...
you're almost right! I tried it, but since you're now dealing with the pointer directly rather than its dereferenced state, you need to also change the '.' to '->'
maybe not, but...
Thank you all very much, this solution works. I've not come across the "define all variables at the start" rule before, and also thanks for solving a mysterious "suspicious pointer conversion"...
Hi, I'm now in a job where I have to code in pure C (not C++) and am having trouble adjusting to the differences, hope you can help. As soon as I un-comment any one of the commented lines in the...