Original Post
Hi, I have a class called engine, which does things like initalises the graphics and sound clases. So In my main program I include engine.h And I create a object called engine. Through this I can access the functions in display and sound by doing theEngine->Sound->play(file); I now want to add other functions to the engine class such as collide. Collide checks to see if two sprites have a collision. But I was wondering is it possible to write these functions, so that rather than writing theEngine->spriteCollide(sprite1, sprite2); I could just write include engine.h spriteCollide(sprite1, sprite2); I just want to be able to use the function as if it had been defined in the main file. The reason being is that I don't think it really is part of a engine object, although possilby I should just use a differnt class?? I looked at some files and saw that the "extern" keyword is used, is that just for using functions written in a external language? I tried writting extern "C++" before my function in the engine.h file, but it didn't work. Any ideas?