The exact path has to be known... this is what I do...
I have a C++ project compiling and running. The folder with the *.CPP file I'm writing is what I cosider my "root". I make a folder named
media. In there I have:
models,
sounds,
whatever... then in the program I load like this:
"./media/models/tank.x"
... for example
Now running inside Visual Studio means that this directory with the *.cpp file is normally the working directory. If you close down Visual Studio and want to run your program directly, copy it out of the debug or the release folder up one to where the *.CPP files are (and media is a sub directory like I described...).
you should have better luck now.. ALSO... learn how to test if a file exists... I think its dbFileExist() or something - search the help... but testing for the file before the load can make things easier to solve... like...
if(dbFileExist("./media/models/tank.x")){
dbLoadObject("./media/models/tank.x",1);
}else{
return; // leave program
};