OK, here waht i want to do.
i wana make driver,device.. and all those globals so i can use device-> in another file/function.
But i can't seem to understand how to "move" a variable from one file to the other or link 2 files variables.
i'm sure this is very newb question but noone of the tutorials cover that.
[forum request]
why not have a sticky "post minor questions here" thread so that newb questoins don't need a new thread everytime.
#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
// this is the class you whant to use
#include "foo.h"
foo myClass;
IrrlichtDevice* device;
ISceneManager* smgr;
int main(){
// here is the initialisation of the engine and main loop...
}
#ifndef FOO_H_INCLUDED
#define FOO_H_INCLUDED
class foo{
// here are the declarations of the class members located
};
extern IrrlichtDevice* device;
extern ISceneManager* smgr;
#endif // FOO_H_INCLUDED
Now you can use device and smgr as they where created inside the foo class...