yeah! we should not need any C++ at all on the AI side.AF wrote:What if we wish to write an AI in pure C? Best to use structs when possible rather than classes.
the question is wether or not we can cast it to one of the other 3 things tobi mentioned, which are cast compatilbe. as it is a class (a C++ thing), and i "learned" that all C++ stuff is incompatible between compilers, i though it may be a problem. the member function should be saved in the clas, and need no space in an array of objects of this type, but maybe gcc saves xyz and MinGW zyx in the memory? or do all compilers save class data in the same way as in C structs?zenzike wrote:That won't work since there's a member function. We couldn't reliably have an array of these objects.hoijui wrote: what about this?:Code: Select all
class XZY { float x, y, z; void foo(); };